Closed (won't fix)
Project:
GMap Module
Version:
6.x-1.0
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Dec 2008 at 16:36 UTC
Updated:
14 Apr 2013 at 22:13 UTC
i have some dynamic actions on my website, so i need to write my own js.
Can anyone explain how to add a marker/poly with my own js to a certain gmap?
it would be wonderfull, if the gmap module provides sth like a api
Comments
Comment #1
jokerejoker commentedI need the same thing, some sort of JS API for the gmap module.
I need some custom code to use the panTo function from the google maps api?
Comment #2
ac00perw commentedThis is a bit old, but Google makes it relevant (it came up first in my search) so I'll post what I've got so far. I have a custom module in which a menu hook spits out venues with longitudes and latitudes (from a separate db- could be nodes or what have you though). My javascript adds a movend listener which triggers a call to the custom module. Markers are then made on the fly based on my venues. I'd like it to be a little 'smarter' than it is though. e.g. it would be great to calculate the current map location and not regenerate markers unless the user moves to a new spot beyond.
Is there an easier way? What about control of marker icons? I was hoping the gmap module would be a help with the marker system is JS.
My .js file follows...
Comment #3
johnvClosing this very old issue. Please reopen if it is still valid.