Add a layer identify


Home
Up
Downloads
templates
Schedule
Members
Archive
AXL (ESRI)
WMS (OGC)
GeoRSS
XML (Static)
Other tools
Discussions
Search
Contact Us


How can you add identify functionality to a WMS service

As of today there is no component yet that is doing the job for you therefore you need to write a little piece of code.
Follow these steps.

  1. Follow how you create a WMS-viewer
  2. Add inside the first frame the following code

  // imports the wmsLayer class
  import classes.eu.eea.types.wmsLayer;

  var new_wmslayer = new wmsLayer;
  new_wmslayer.layerid = "selection";// The id of the new selection layer
  new_wmslayer.fromlayer = "mylayer"; // The WMS layer that should be queries
 

  //Add the selection into the map viewer component
  my_map.addSelection(new_wmslayer)
 

  // Capture the event when the user has made a selection
  my_map.onSelectResult = function(myArr,selobj) {
      trace("onSelectResult() has triggered.");
      myGrid.removeAllColumns();
      // Remove layers each time
      myGrid.dataProvider = myArr;
      for (var i in new_wmslayer) new_wmslayer.query_layers.pop();
  }

4. Compile the flash movie clip and see the result.


Home | Downloads | templates | Schedule | Members | Archive | AXL (ESRI) | WMS (OGC) | GeoRSS | XML (Static) | Other tools | Discussions | Search | Contact Us

Locations of visitors to this page

 All source code and components can be used freely by anybody.
For problems or questions regarding this Web site contact
[ProjectEmail].
Last updated: 05/10/07.