0

I was trying out rMaps package, which uses leaflet js api. While plotting a coordinate c(3.09407,101.504961), rmaps/leaflet point is off from the actual point.

require(rMaps)
map <- Leaflet$new()  
map$setView( c(3.09407,101.504961))   
map$marker(c(3.09407,101.504961))     
map

Open Street Map

Open Street Map
Google MAp

Google Map

rMap/Leaflet plot

rMap plot

is this a known issue? Does leaflet requires some correction to get exact plot.

2
  • it seems in the html source with rMap generated, maker value is 3.0941,101.5 . which is wrong. Any one has any solution for this issue? Commented Mar 17, 2014 at 7:17
  • It is a bug in rMaps, and NOT Leaflet. It happens due to rounding when converting to JSON. There is a pull request with a fix, which I will be merging shortly.
    – Ramnath
    Commented Mar 17, 2014 at 13:23

0

Browse other questions tagged or ask your own question.