[OpenLayers-Users] about text layers

Karina Guardado kguardado at gmail.com
Wed Feb 24 10:13:38 EST 2010


Hello everybody,

I have 2 layers that are point type and I want users to be able to click on
one point (of any layer) and get the information(attributes) related to that
point. Here is my code

 var estaciones = new OpenLayers.Layer.WMS("
estaciones",
"http://myurl/cgi-bin/mapserv?MAP=/var/www/amss_wms2.map",
                {layers:'estaciones', transparent:
"true",format:"image/gif"});

    var puntos = new OpenLayers.Layer.WMS("puntos",
                "http://myurl/cgi-bin/mapserv?MAP=/var/www/amss_wms2.mapl",
                {layers:'puntos', transparent: "true",format:"image/gif"});

so far what I was using was a text layer to generate a marker and then get
the information  as follows:

var  infpuntos = new OpenLayers.Layer.Text( "infpuntos", {location:
"textpunto.php"},
                       "
http://myurl/cgi-bin/mapserv?MAP=/var/www/amss_wms2.map");

var  infestaciones = new OpenLayers.Layer.Text( "infestaciones", {location:
"textpunto.php"},    "
http://myurl/cgi-bin/mapserv?MAP=/var/www/amss_wms2.map");


but I would like that users could be able to click on one point and get the
information without using this text markers. I found information about
vector and gml layers with text format but I would like to know how to use
them to work with more than one layer  or if there are other solutions that
someone could recomend.


thanks in advance.

Karina Guardado
El Salvador
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100224/a45550fc/attachment.html


More information about the Users mailing list