Update: Apr 15, 2015: Google looked into making latest Maps API backwards compatible to fix this problem but issued a "won't fix" decision.
Update: Feb 11, 2015: Believe this to be a problem that is caused by an update to the experimental version of Google Maps API 3.19 on Feb 10, 2015: https://developers.google.com/maps/documentation/javascript/3.exp/reference
Have been in touch with the owner of the plotGoogleMaps package - can confirm that specifying v3.18 does generate maps that work correctly.
Unless the issue in v3.19 is fixed before becoming the "release" version, all prior maps created by plotGoogleMaps will no longer function correctly.
Original Post: This question is for users of the plotGoogleMaps package in R and for the Google Maps API support team.
Maps created prior to February 10, 2015 using the aforementioned R package are behaving differently starting this evening (Eastern Time). Specifically, the "info box" that appears when you click on the first map pin is then used when you click on any other pin on the map.
A reproducible R code example taken from Milan Kilibarda's tutorial (here: http://cran.r-project.org/web/packages/plotGoogleMaps/vignettes/plotGoogleMaps-tutorial.pdf).
data(meuse)
coordinates(meuse)<-~x+y
# convert to SPDF
proj4string(meuse) <- CRS('+init=epsg:28992')
# adding Coordinate Referent Sys.
# Create web map of Point data
m<-plotGoogleMaps(meuse,filename='myMap1.htm')
When you click on a map pin, the info box that opens becomes the same info box opened for every other map pin. Htm map files created by plotGoogleMaps from several months ago now exhibit this same behavior so I am thinking this is a result of a change to the Google Maps API service.
Another example in the tutorial that used to work is plotting a SpatialPolygonsDataFrame using the following R code:
require(plotGoogleMaps)
require(maptools)
require(RColorBrewer)
nc <- readShapeSpatial(system.file("shapes/sids.shp",package="maptools")[1],
proj4string=CRS("+proj=longlat +datum=NAD27"))
m<-plotGoogleMaps(nc,zcol="NWBIR74",filename='MyMap6.htm',
mapTypeId='TERRAIN',
colPalette= brewer.pal(7,"Reds"), strokeColor="white")
When you click on a polygon, the info box opens in the top left corner (it should open where the click is registered) and it does not change when you click a different polygon. As an aside, in the past, although the info box would open in the top left corner, it would eventually move to the click point after 3 clicks. As of today, the contents of the info box does not change.
This behavior can be observed by loading a previously created Google map using plotGoogleMaps, not just maps created as of today.
I am thinking that the above problems are caused by a change on Google's end (since previously created maps now exhibit the same behavior). I have tested this on both a Mac with different browsers (Safari 7.1.3, Firefox 34.0.5, Chrome 40.0.2214.111) and on a PC using IE 10.0.9200.17183 and the same results occur.
I am using R 3.1.2 and the latest version of plotGoogleMaps.
If anyone from the Google Maps team reads this, can you please verify whether an update on your end is causing this and if so, when can we expect a fix?
Thanks in advance.