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






<<attachment: peterh.vcf>>

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to