I've downloaded the following google map:

library(raster)
myExtent <- matrix(c(-1.87710, -1.772096, 55.61399, 55.682171), ncol=2,
byrow=T)
g <- gmap(myExtent, type='hybrid')
plot(g, interpolate=T)

I'm trying to plot the raster over the google map:

rownames(myExtent) <- c('long', 'lat')
colnames(myExtent) <- c('min', 'max')
rasterExtent <- extent(myExtent)
myRaster   <- raster(ext=rasterExtent,crs="+proj=merc +a=6378137 +b=6378137
+lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null
+no_defs")
values(myRaster) <- rnorm(ncell(myRaster))

plot(myRaster, add=T, alpha=0.5)

However, there's no sign of the raster in the plot. I presume theres a
projection issue here. How can I get the raster to plot over the top of the
google map?

Thanks
Ross



	[[alternative HTML version deleted]]

