apneadiving / Google-Maps-for-Rails

Enables easy Google map + overlays creation in Ruby apps
https://apneadiving.github.io/
MIT License
2.27k stars 382 forks source link

addMarker is not precise - GoogleMap #424

Closed nimzco closed 10 years ago

nimzco commented 10 years ago

When I add multiple markers with the same coordinates, they don't show up in the same place: Ex: google_map_handler.addMarker({lat: 48.859231113, lng: 2.341711131}) // Paris

But it will be precise if you add the marker with the google map API like following:

latlng = {lat: 48.859231113, lng: 2.341711131}
var marker_location = new google.maps.LatLng(latlng.lat, latlng.lng);
var marker   = new google.maps.Marker({
    position: marker_location,
    map: google_map_handler.getMap()
  });
apneadiving commented 10 years ago

http://stackoverflow.com/questions/20633640/google-maps-for-rails-location-floating-on-reload

please ask question on stack overflow