<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=281052019-24092008>Is the layer a vector layer? The control will only work
for a vector layer, i would think.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=281052019-24092008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=281052019-24092008>Arnd Wippermann</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=281052019-24092008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT face=Tahoma size=2><B>Von:</B>
users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] <B>Im Auftrag
von </B>Bas Couwenberg<BR><B>Gesendet:</B> Mittwoch, 24. September 2008
16:50<BR><B>An:</B> users@openlayers.org<BR><B>Betreff:</B> [OpenLayers-Users]
extent has no properties<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>
<DIV>Hello,</DIV>
<DIV> </DIV>
<DIV>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:</DIV>
<DIV> </DIV>
<DIV>------------------</DIV>
<DIV> Select = OpenLayers.Class(OpenLayers.Control,
{ <BR> <BR> layer:
null,<BR>
<BR> defaultHandlerOptions:
{<BR>
'single':
true,<BR>
'double':
false,<BR>
'pixelTolerance':
0,<BR>
'stopSingle':
false,<BR>
'stopDouble': false<BR> },</DIV>
<DIV> initialize:
function(layer,options) {<BR>
this.layer =
layer;<BR>
this.handlerOptions =
OpenLayers.Util.extend(<BR>
{},
this.defaultHandlerOptions<BR>
);<BR>
OpenLayers.Control.prototype.initialize.apply(<BR>
this,
arguments<BR>
); <BR>
this.handler = new
OpenLayers.Handler.Click(<BR>
this,
{<BR>
'click':
this.trigger<BR>
},
this.handlerOptions<BR>
);<BR> }, </DIV>
<DIV> </DIV>
<DIV>------------------------</DIV>
<DIV>When I user the 'layer' parameter : <B><FONT color=#0000c8 size=2>
<P>var</P></FONT></B><FONT size=2>selectCcontrol = </FONT><B><FONT color=#0000c8
size=2>new</FONT></B><FONT size=2> </FONT><FONT color=#0064c8
size=2>Select</FONT><FONT size=2>(wozSelectLayer, {</FONT><FONT color=#008000
size=2>'displayClass'</FONT><FONT size=2>: </FONT><FONT color=#008000
size=2>'olControlSelectFeature'</FONT><FONT size=2>}) ;</FONT>I get the
error:<SPAN class="objectBox objectBox-errorMessage hasBreakSwitch">
<DIV class=errorTitle>extent has no properties</DIV>
<DIV class=errorTrace></DIV>
<DIV class="errorSourceBox errorSource-exec"><SPAN class=errorSource>this.extent
= extent.clone();</SPAN></DIV>
<DIV class="logRow logRow-errorMessage"><A
class="objectLink objectLink-sourceLink">Renderer.js (line 98)</A></DIV>
<DIV class="logRow logRow-errorMessage">I need the layer in this class and
without it the eror doesn't occur. What am I doing wrong?</DIV>
<DIV class="logRow logRow-errorMessage"> </DIV>
<DIV class="logRow logRow-errorMessage">Best regards,</DIV>
<DIV class="logRow logRow-errorMessage"> </DIV>
<DIV class="logRow logRow-errorMessage">Bas Couwenberg</DIV>
<DIV
class="logRow logRow-errorMessage"></DIV></SPAN> </DIV></DIV></BODY></HTML>