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

Christopher Schmidt crschmidt at metacarta.com
Thu Oct 8 08:29:54 EDT 2009


On Thu, Oct 08, 2009 at 01:27:30PM +0300, Alex G. wrote:
> 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.

Er... It shouldn't be any different? Can you share your current code
that isn't working?

-- CHris

> 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!

> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list