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
_______________________________________________
Dev mailing list
[email protected]
http://openlayers.org/mailman/listinfo/dev