[mapserver-users] WMSGetFeatureInfo

Ir. Peter Huis in 't Veld peterh at ivs90.nl
Sat Nov 21 12:56:28 PST 2009


Hi,

I'm trying to set up a WMS service with the possibility to obtain a 
popup containing the feature items.

the components I''m using is:
- Openlayer
- Mapserver

Testing it I can visualize all items but I get the following error 
message :

Message: Object doesn't support this property or method
Line: 229
Char: 9
Code: 0
URI: http://myserver/lib/OpenLayers/Handler/Feature.js

Looking at the code it looks like it has something to with the 
evalaution of the mouse click event

I've three questions:
- Could someone explain a bit more about this error?
- Should I stick with WMS or should I use WFS?
- Does someone has some advice what might cause a problem based on the 
code snippet underneath?

Thanks in advance for any support

Peter


--------------------
Within in my webpage I've some javascript looking like:


  function init() {
  ....
        info = {
          click: new OpenLayers.Control.WMSGetFeatureInfo({
           'url': 'http://cccc',
           'title': 'Identify features by clicking',
           'layers': "test",
           'queryVisible': true
          })};
       for (var i in info) {
           info[i].events.register("getfeatureinfo", this, showInfo);
           map.addControl(info[i]);
       }

     info.click.activate();
  ....
  }

   function showInfo(evt) {
       if (evt.features && evt.features.length) {
            highlightLayer.destroyFeatures();
            highlightLayer.addFeatures(evt.features);
            highlightLayer.redraw();
       } else {
           $('responseText').innerHTML = evt.text;
       }
   }



In mapserver I've defined the layer and all wms_... parameters
LAYER

 METADATA
     "wms_title" "IVS90 Stremmingen"
     "wms_include_items" "all"
      "wms_feature_info_mime_type" "text/html"
  END

 TYPE POINT
 TOLERANCE 10
 TOLERANCEUNITS kilometers
 ...

 CLASS
      TEMPLATE "template.html"
      ...
 END

END






-------------- next part --------------
A non-text attachment was scrubbed...
Name: peterh.vcf
Type: text/x-vcard
Size: 309 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20091121/ef686bc9/attachment.vcf>


More information about the MapServer-users mailing list