0

I display wms features on a map and i want to see the attributes of all features after the map is loaded. I know the GetFeatureInfo request and i made examples when i clicked on a feature and than a popup was appeared with the infos. But i need a solution when all the popups appear after the map and the features are loaded. Any idea?

2
  • do you need that all the popups will be open by default?
    – Gery
    Jul 17, 2013 at 9:34
  • yes. don't know whether OpenLayers supports this. i searched but haven't found any solution yet.
    – Imreking
    Jul 17, 2013 at 9:52

2 Answers 2

1

i found a solution. With a servercall i get the features of the selected layer in xml format. I can process that xml and gain the necessary coordinates. Than i put popups on the map with those coordinates.

the request:

OpenLayers.Request.GET({url: "http://localhost:8080/geoserver/opengeo/wfs?service=wfs&version=1.1.0&request=GetFeature&typeName=" + p_strLayerName,
                                            async: false
                                         });
0

I think you can achieve this with this example:

http://openlayers.org/dev/examples/light-basic.html

I haven't tested yet but it can work if you change this:

hover:true,

to:

hover:false,

this may allow you to have all the popups open by default. In any case, you should play with the autoActivate option to see if something else is needed.

This may also help you: http://openlayers.org/dev/examples/osm-marker-popup.html

Hope this helps,

1
  • Unfortunately, hover:false didn't work. If i set that to false, than popups appeared only on click event.
    – Imreking
    Jul 18, 2013 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.