From: Dave P. <dav...@pi...> - 2011-07-13 06:05:48
|
Hi List, I trying to implement the Point handler, its construct requires a Control as an argument( see http://dev.openlayers.org/releases/OpenLayers-2.10/doc/apidocs/files/OpenLayers/Handler/Point-js.html ), but the wrapping for the DrawFeature control requires a PointHandler( see http://dev.openlayers.org/releases/OpenLayers-2.10/doc/apidocs/files/OpenLayers/Control/DrawFeature-js.html)or similar construct at creation time. It seem to be a case of the chicken and the egg, you both off functions to create the other! >From the worked examples I have seen, I have assumed the normal solution is to create the handler first and then create the control, openlayers will then populate the internal control argument for the handler function when the control is constructed. If that is the case does it make sense to supply a constructor for the PointHandler that takes a control argument? Dave. |