[development] how to access Drupal.gmap methods

ufuk bayburt ufukbay at gmail.com
Tue Oct 13 12:50:37 UTC 2009


On Tue, Oct 13, 2009 at 1:37 PM, Hans Langouche <hans.langouche at gmail.com>wrote:

> Hi there,
>
> I'm using the drupal gmap module to display some maps and markers.  Now I
> want to extend the functionality with some ajax stuff and I'm having
> difficulties understanding the javascript Drupal.gmap object.
>
> I figured out how to access the google maps object:
> var m = Drupal.gmap.getMap('yourmapid');
> googleobject = m.map
>
> Now when looking at the code, I see there are some interesting marker
> functions defined already in marker.js (and gmap_markers.js).  My question
> is how to access these functions as I always get a not defined error.
>
> m.addmarker(...);
> or
> m.clearmarkers();
>
> throw above error.
>
> Tnx,
>
> HnLn
>


try map.change('EVENT', -1, data);
e.g. mapchange('addmarker', -1, markerObject);
-1 means execute all addmarker hooks of the map.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20091013/dacf9ee5/attachment.html 


More information about the development mailing list