[OpenLayers-Users] extent has no properties

Eric Lemoine eric.c2c at gmail.com
Wed Sep 24 16:27:09 EDT 2008


Given that the error occurs in the renderer it's very likely that it's
a vector layer. Eric

2008/9/24, Arnd Wippermann <arnd.wippermann at web.de>:
> 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
>
>



More information about the Users mailing list