[OpenLayers-Users] add pop ups to point data

Gary Nobles garynobles at yahoo.com
Sat Jun 25 16:05:59 EDT 2011


hi I have a point dataset via wms and I want to be able to click on a point
and bring up a pop up with all the attribute data

here is a very cut down version of my code:


<!DOCTYPE html>
<html>
  <head>
    <title>OpenLayers Tutorial - Basic Map Setup</title>
    
    
  </head>
</html>





Here is the code I found from the demo
http://openlayers.org/dev/examples/getfeatureinfo-popup.html 
http://openlayers.org/dev/examples/getfeatureinfo-popup.html 


        info = new OpenLayers.Control.WMSGetFeatureInfo({
            url: 'http://demo.opengeo.org/geoserver/wms', 
            title: 'Identify features by clicking',
            queryVisible: true,
            eventListeners: {
                getfeatureinfo: function(event) {
                    map.addPopup(new OpenLayers.Popup.FramedCloud(
                        "chicken", 
                        map.getLonLatFromPixel(event.xy),
                        null,
                        event.text,
                        null,
                        true
                    ));
                }
            }
        });
        map.addControl(info);
        info.activate();

I have tried to change the wms url but i can't get it to work and what does
"chicken" mean?

Also there is a table which pops up so this html has to go somewhere I
guess.

I am new to openlayers, im learning quickly but I still get stuck!

Any help is welcome

thanks

Gary






--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/add-pop-ups-to-point-data-tp6515637p6515637.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list