[OpenLayers-Dev] Constructor and functions of the same class
Vidal, Antoni
antoni.vidal at icc.cat
Thu Dec 4 07:47:51 EST 2008
Hello,
I added the fllowing lines into the initialize function of the EditingToolbar class:
Controls[1] = new OpenLayers.Control.Measure(OpenLayers.Handler.Path, OpenLayers.Util.extend({displayClass: 'olControlDrawFeaturePath', title:_("Longitude")}, measureOptions));
layer.events.register("beforefeaturemodified", controls[1], function(e){this.mesurar(e.feature.geometry)});
and bellow the function:
mesurar: function(g) {
alert("works!");
},
When I execute it, it generates the error: "this.mesurar is not a function"
Why the constructor don't understand mesurar as a function of his class?
Thank's a lot
Antoni Vidal
Institut Cartogràfic de Catalunya Tel: +34-93 567 1500 Ext. 3228
Parc de Montjuïc Fax: +34-93 567 1567
08038 Barcelona http://www.icc.cat <http://www.icc.cat/>
Spain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20081204/0a6ad8da/attachment.html
More information about the Dev
mailing list