2

Is it possible to embed a jQuery animated SPAN element into a Google Map at a specific latitude and longitude? (Just like a map marker.)

Currently, I am using a jQuery plugin to animate a series of transparent PNG frames and then populate a span tag with those PNGs. (See the animation plugin here: http://blog.shynet.nl/post/2010/08/28/Alternative-to-animated-GIFs-AnimateImages-jQuery-Plugin.aspx)

My original idea was to use CSS to position the SPAN object on top of the map where I wanted it, but this solution will not work when the user drags the map. How can I embed this object into a map in a fashion similar to a map marker?

My source code can be found on PasteBin here: http://pastebin.com/MY0SfqXE

An example would be much appreciated!

ZettaGeek
  • 309
  • 2
  • 11

1 Answers1

0

Yes you can embed. there are methods to map latlong to pixel value relative to map container. for this you have to create a custom overlay. see this thread

Community
  • 1
  • 1
Anoop
  • 23,044
  • 10
  • 62
  • 76
  • Thank you for posting this link! Upon reviewing the code, this solution is specific to retrieving the contents of a marker DIV, and not actually adding a DIV to the map. However, I could be reading this wrong. Would you mind clarifying your solution? Thank you again for responding! :) – ZettaGeek Oct 19 '12 at 04:22
  • I faced same problem long ago. and solve it using custom overlay. right now I don't have that code. .getProjection() method is not available in google's native overlay. You have to create a custom overlay. – Anoop Oct 19 '12 at 17:28
  • Thank you for the fast response. Do you know where I might find a VERY simple guide to using the custom overlays? – ZettaGeek Oct 19 '12 at 23:13