Before Google Maps API in version 2.75 changing icon for
GMarker was not so easy. Why? Deleting old marker and creating new one is quite straightforward. But deleting marker means delete events associated with this particular marker. And recreating them for new one makes things much more complicated. Especially when events are added during application life time, You have to watch which were added and what listeners are responsible for handling them. Or I should write You had, since
setImage() does just that – replaces image associated with marker. Deleting is no more required.
As You may expect I’m preparing an update to RNS. With this development round I’m also bringing application to compatibility with current stable Rails (from 1.1.6 to 1.2.3). And I have discovered change with script.aculo.us behavior, in Ajax.Updater in
parameters option. In Rails 1.1.6 it can be sign symbol used several times in string (like
swlat=333.3;swlng=444.4) in 1.2.3 string is truncated on second sign symbol. I have rewritten my code to encode string in other format in only one parameter and Rails application unpacks it before processing. Other solution could be to play with
Ajax.Updater property. This allow to set whole body of request, so we can set many variables.
Now go back to coding, some few more features wait to be implemented!