[OpenLayers-Users] OpenLayers.Layer.Text - Place marker on click without file

Alex G. unseen.wizard at gmail.com
Thu Oct 8 06:27:30 EDT 2009


Hi all,

I am interesting in constructing a function that places a marker with a
bubble text as provided by OpenLayers.Layer.Text but I want to provide
coordinates, title and description on the fly (without saving them to a file
and then loading them to the function).

I am using the OpenLayers example to catch clicks and then place a simple
marker using markers.addMarker(new OpenLayers.Marker(new
OpenLayers.LonLat(lonlat.lon,lonlat.lat),icon)); and everything seems to
working fine.

But I cannot seem to be able to figure out a way to do the same for
OpenLayers.Layer.Text.

I am guessing some heavy modification of Layer/Text.js is required? Is there
maybe a patch around that could help me on this since my Javascript
knowledge is pretty bad.

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091008/86bcd7b2/attachment.html


More information about the Users mailing list