Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
    
do you need that all the popups will be open by default? –  Gery Jul 17 '13 at 9:34
    
yes. don't know whether OpenLayers supports this. i searched but haven't found any solution yet. –  Imreking Jul 17 '13 at 9:52
add comment

2 Answers

up vote 1 down vote accepted

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
                                         });
share|improve this answer
add comment

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,

share|improve this answer
    
Unfortunately, hover:false didn't work. If i set that to false, than popups appeared only on click event. –  Imreking Jul 18 '13 at 10:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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