[Talk-in] Markers on click

Sajjad Anwar sajjadkm at gmail.com
Wed Jan 20 07:53:19 GMT 2010


Hello.

I'm a new user of OpenLayers. Im trying to create a website in which a layer
of OpenStreetMap is displayed. And when the user clicks on a point, I need
to add a marker to that point. I have added the OSM layer and configured so
that once a click occurs it returns an alert with the lat/lon, by following
an example at OpenLayers Click Handler
Example<http://openlayers.org/dev/examples/click-handler.html>.

But I need to put the marker at the point where the click occurs. Tried many
examples, but could not figure that out.
My current code snippet is here http://pastebin.com/m24d302f2

Please help.

Thank you.

-- 
Sajjad Anwar
http://sajjad.in
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-in/attachments/20100120/cc099b6f/attachment.html>


More information about the Talk-in mailing list