Temporary Custom Marker

379 views
Skip to first unread message

Hendrix

unread,
Oct 6, 2010, 8:12:29 PM10/6/10
to Google Maps JavaScript API v3
Hi,
I am trying to create my own (temporary) marker in google maps but
can't seem to get anything to work (I have tried appending an img to
the #map_canvas div). I want to be able to overlay an image of an
arrow where the user clicks, once the image is there the user would be
able to rotate to indicate their direction. Once they are done it will
send the info (latlng and arrow orientation) back to my server. If
anyone could point me in a right direction I think I could figure the
rest out. I see that there is a pixel to latlng function that can be
called but again I am not sure how to get my custom image hovering
over the map in order to capture the pixel.

Thanks in advance!

Rossko

unread,
Oct 7, 2010, 4:26:49 AM10/7/10
to Google Maps JavaScript API v3
> I am trying to create my own (temporary) marker in google maps

umm, from the description there seems to be no reason why you
shouldn't add a standard marker with a custom image, and let the API
handle the maths?
You can't rotate a marker icon, but you can setImage from a library of
images.

Matthew Hendrix

unread,
Oct 7, 2010, 8:59:27 AM10/7/10
to google-map...@googlegroups.com
After I have the orientation and location from the user then yes, I will make it a standard user. The issue is getting those 2 pieces of information first.


--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Reply all
Reply to author
Forward
0 new messages