[OpenLayers-Users] extent has no properties
Arnd Wippermann
arnd.wippermann at web.de
Wed Sep 24 15:22:36 EDT 2008
Is the layer a vector layer? The control will only work for a vector layer,
i would think.
Arnd Wippermann
_____
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Bas Couwenberg
Gesendet: Mittwoch, 24. September 2008 16:50
An: users at openlayers.org
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080924/ee2cb37d/attachment.html
More information about the Users
mailing list