0

My friend and I have a project we're trying to accomplish with using Google Maps. We want to be able to have people visit our website and add/drag a marker to anywhere on a custom google map. I've looked around a lot for something I could possibly mimic, but to no avail.

If someone could please help us. We also are not looking for someone to just give us the answer, but kind of steer us in the right direction. We would much rather learn how to do this, than for it to be handed to us.

Thanks!

Kara
  • 6,115
  • 16
  • 50
  • 57
  • I guess to be more specific, I would like to know the tools necessary for something like this to happen, or a recipe, if you will. We have a site, and have tried using mapbuilder.net to help us create our little mashup, but we don't really understand how any of it works. I feel like this might not be the best way to figure out how to do this, but if this isn't the place to be, I was hoping someone could show me somewhere I could start? – user1580816 Aug 08 '12 at 18:07

1 Answers1

1

Pretty simple, you can set an click event on the map that gives you the latitude and longitude of the click, and use that to create a marker. And when you do, set the draggable property to true. That allows users to drag it around, and when it lands it will fire another event.

Some info that might be helpful: https://developers.google.com/maps/documentation/javascript/events https://developers.google.com/maps/documentation/javascript/overlays#Markers https://developers.google.com/maps/documentation/javascript/reference#Marker (check out events section)

Mano Marks
  • 8,761
  • 3
  • 27
  • 28