user1604292
user1604292

Reputation: 21

How to create placemarks manually as in "My Maps"

I have a fully functioning map using the API v3 with markers placed as a result of database searches, and info windows that pop up correctly. So far, so good.

What I would like to do is to allow the user to place a marker on the map manually, i.e by dragging and dropping a placemark in exactly the same way as google "My Maps" uses to build a map or by clicking on the map.

There are several reasons for doing this, but one is that I would like the user to easily identify a centre point of interest so that I can filter searches within a radius of this point.

I would have thought that this option would be useful to others.

Maybe I am using the wrong search terms for this, and the terms "marker" and "placemark" seem to be interchangeable, which doesnt help, but I cannot formulate a search which has even shown that anyone else is trying to do this.

Upvotes: 2

Views: 562

Answers (1)

geocodezip
geocodezip

Reputation: 161334

Have you seen this example of the drawing tools, it allows you to add Markers, Polylines and Polygons, you can customize it to just do Markers.

Here is the documentation for the Drawing Manager

Upvotes: 2

Related Questions