There’s a rather neat mapping tool over at http://www.quikmaps.com/ which allows you to doodle on google maps and draw trails, add markers etc. We liked it so much that we’re using it in a new site we’re working on but this week we hit a problem when adding marker text caused hangs and crashes.
The author of the tool has gone on to pastures new and seems hard to track down, so it was down to us to come up with a solution if we wanted to keep our project on track.
Detailed analysis of the google maps groups led Roger to discover that only this week, google had deprecated use of any api version prior to 2.140 and it transpired that quikmaps was developed with version 2.(0)50 although we had it running with 2.(0)85. This was a clue, and reading through the change logs for each api version gave a further clue with the discovery that the markerinfowindow code had been taken out of the main google maps api and modularised so it would load on demand … in theory!
The way that quikmaps manipulates the DOM with prototype meant that the google api wasn’t realising that the markerinfowindow module was in fact being demanded and so the solution turns out to be to force the map to pull in the infowindow module by simply adding in editor.map.getInfoWindow().show() after the map is instantiated in the browser.
Full details here;