additional javascript for google maps widget

0
We want to add labels to the markers of the google maps widget. A label class we found seems the perfect fit. It depends on google maps of course, but when I try to load it from my widget using dojo.require I get an exception stating: "google not defined". I guess I have to load the google maps api before my label.js is loaded by the dojo.require statement. Question is: how do I do this? Can I just copy the if (!window._googleLoading) { bit from the google maps widget?
asked
2 answers
1

Hi Jim, can you try placing the dojo.require for the Label as the first line in the displayMap function? This would ensure that the Google api is loaded before the Label is included.

You might have to to do another runOrDelay to check if it's directly available though.

answered
0

May be Robert van 't Hof could give an answer, but I think this is not necessary. If you download the google maps module and you place the google maps widget and look at the appearance section.

There you see Enum based marker and Enum attribute. I was wondering what these are because there is no remark for it in the documentation. But if you delve in the javascript I think this already should do what you want (now only to get it to work). First expand the Location with an enumeration. Now the Enum attribute can be filled. In the Enum based marker section you can now select images for the enumeration. But the problem is that it does not work. If I set the location to an enumeration it will not display that marker. I must be doing something wrong here. But may be Robert would be so nice to explain the possibilities.

Because if we could use the dynamic images as source for the marker images Dynamic images your problem could be solved.

answered