apneadiving / Google-Maps-for-Rails

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

Wiki error #73

Closed iRonin closed 13 years ago

iRonin commented 13 years ago

https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Javascript-goodies in a few places you have Gmaps. and I get ReferenceError when I try to access it. Is it a typo?

You had an example before on how to use Ajax. I'm trying to use Gmaps4Rails.replaceMarkers and Gmaps4Rails.addMarkers but it does not work as expected.

apneadiving commented 13 years ago

Documentation is right but it refers to v1.0.0 which will be released in a few hours.

For prior versions, Gmaps4Rails.createMarkers and Gmaps4Rails.replaceMarkers should do the trick. What error do you have?

iRonin commented 13 years ago

Ok, I'm looking forward to v1.0.

Errors: they are weird. I'm interested in addMarkers - I understand that if I want to add single marker I just pass there and array with marker json, is it right? It seems that all the markers are duplicated. I started playing with these functions and if I then use replaceMarkers - only some of the markers are replaced. If I use replaceMarkers after page loads it's ok, but as soon as I use addMarkers at least twice, it behaves strange. Any ideas?

apneadiving commented 13 years ago

Ok, it's a bug I'll correct.

Thanks for reporting!

apneadiving commented 13 years ago

just pushed v1.0.0 which fixes the bug.