Is the layer a vector layer? The control will only work for a vector layer, i would think. Arnd Wippermann _____
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Bas Couwenberg Gesendet: Mittwoch, 24. September 2008 16:50 An: [email protected] Betreff: [OpenLayers-Users] extent has no properties Hello, I made a custom control in a separate *.js file which I want to use on my WMS layer to select a point there and with a WFS GetFeature request retrieve the geometry. The top part of the class looks as followed: ------------------ Select = OpenLayers.Class(OpenLayers.Control, { layer: null, defaultHandlerOptions: { 'single': true, 'double': false, 'pixelTolerance': 0, 'stopSingle': false, 'stopDouble': false }, initialize: function(layer,options) { this.layer = layer; this.handlerOptions = OpenLayers.Util.extend( {}, this.defaultHandlerOptions ); OpenLayers.Control.prototype.initialize.apply( this, arguments ); this.handler = new OpenLayers.Handler.Click( this, { 'click': this.trigger }, this.handlerOptions ); }, ------------------------ When I user the 'layer' parameter : var selectCcontrol = new Select(wozSelectLayer, {'displayClass': 'olControlSelectFeature'}) ;I get the error: extent has no properties this.extent = extent.clone(); Renderer.js (line 98) I need the layer in this class and without it the eror doesn't occur. What am I doing wrong? Best regards, Bas Couwenberg
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
