[OpenLayers-Users] WFS layer, markers and popups
Marcos Nogueira
nomarcos at gmail.com
Fri Jul 24 23:47:34 EDT 2009
Hi everyone,
I am developing an application wich has WFS Layers.For one layer, I was
using featureClass: OpenLayers.Feature.WFS and so I get the red marker in
the points, but for
the other layer I use:
var symbolizer = OpenLayers.Util.applyDefaults(
{externalGraphic: "img/marker-blue.png", pointRadius: 10}
var especimeA = new OpenLayers.Layer.WFS("especime A",
"http://127.0.0.1:8081/cgi-bin/mapserv.exe?map=c
:\\maps\\teste_postgis.map",
{typename: "zctas"},
{styleMap: new OpenLayers.StyleMap({
"default": symbolizer})
});
map.addLayer(especimeA);
For that layer in which I use the blue marker, as I move the map, the
markers move their position too. If I change it to
featureClass: OpenLayers.Feature.WFS, the points stay where they should be
if I move the map or not.
My base layer is a google maps one.
My questions are:
1 - Why is it happening and how do I fix it ??
2 - How can I associate a popup to each point ? and how can I render
information that is in my DB (postgis) in it ?
For example, I have:
id Name Point
1 Cat (-23,-45)
I'd like to associate a popup in it so that it shows "Cat" for example when
I click in the marker representing the point (-23,-45) in the map.
I am using Mapsever (MS4W), postgre 8.3, postgis 1.3.6 and openlayers 2.8
Thanks for your attention guys,
Marcos
--
"Saber o que é certo e não fazê-lo é a pior covardia."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090725/0999f583/attachment.html
More information about the Users
mailing list