# The function is currently defined as
function(pos, legend, ...)
{
oldpar <- par()
par(geopar$gpar)
on.exit(par(oldpar))
xx <- Proj(pos$lat, pos$lon)
legend(xx$x, xx$y, legend = legend, ...)
}
Run the code above in your browser using DataLab