dkahle / ggmap

A package for plotting maps in R with ggplot2
765 stars 231 forks source link

Allow for other coordinate systems (e.g. UTM) #14

Open noamross opened 11 years ago

noamross commented 11 years ago

I would like to be able to use UTM coordinates for my axes in ggmap. I currently do this by getting my background with get_map(), converting the bounding box attributes via rgdal::spTransform, and using ggplot() + inset_raster() + ... + coord_fixed(). For small map areas, UTM are more understandable units because they are in meters. It would probably be helpful to be able to convert to meters/km and/or set the axes to start at zero at the origin.

ejjunju commented 11 years ago

hei, i am also intrested in this. But i the meanwhile i have a problem i need to fix, can you help me?

Background maps

library(ggplot2);library(ggmap);library(rgdal) mp <- get_map(location = c(lon = 11.169453, lat = 63.691654), zoom = 16, maptype = 'hybrid' ) how do i get mp to UTM with spTransform?