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 am creating a map with about 1000+ points using Openlayers. Currently when I click on one point's icon, the description for the point shows up in a popup, and to exit the popup I need to click on the same point's icon again. Is there a way to modify the code for this so that I can press a close button or I can click anywhere on the map so that this popup will close again? I know there is a way if I am just using a regular popup but I am using an Openlayers.layer.text layer.

var pois = new OpenLayers.Layer.Text( "Frequencies",
            { location:"./frequencyrange.txt",
              projection: map.displayProjection
            });
    map.addLayer(pois);

I use this code to add the text layer. Within the text file would be the following columns: lon lat title description icon iconSize iconOffset. Is there another column that I should add for the popup? I have tried a column that was supposed to modify the size of the popup but it did not work for me. So, so far I have not been able to modify the popup except for what is in it.

share|improve this question
add comment

1 Answer

This OpenLayers example shows a type of pop up that has a close button and is using the same type of layer so I shouldn't be difficult to you to adapt it to your case.

share|improve this answer
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.