Hi Gautier,
You can add the code as below in head part of your aspx page and change the “Total Length:” and “Total Area:” to French for change that.
<script language =javascript>
var OnMapCreated = function (map) {
handleMeasurements = function (feature) {
var units = feature.units;
var measure = feature.measure.toFixed(3);
if (feature.order == 1) {
html = String.format("<div style=‘font-size:small’>Total Length: <span style=‘color:red’>{0} {1}</span></div>", measure.toString(), units.toString());
}
else {
html = String.format("<div style=‘font-size:small’>Total Area: <span style=‘color:red’>{0} {1}<sup>2<sup></span></div>", measure.toString(), units.toString());
}
if (feature.geometry.CLASS_NAME.indexOf(‘LineString’) > -1) {
var length = feature.geometry.components.length;
lonLat = { lon: feature.geometry.components[length - 1].x, lat: feature.geometry.components[length - 1].y };
}
else {
var length = feature.geometry.components[0].components.length;
lonLat = { lon: feature.geometry.components[0].components[length - 2].x, lat: feature.geometry.components[0].components[length - 2].y };
}
var size = new OpenLayers.Size(450, 200);
var popup = new OpenLayers.Popup.FramedCloud(‘DistancePopup’, lonLat, size, html, null, true);
popup.isAlphaImage = true; // fix IE 6.0 problem
this.map.addPopup(popup);
}
}
</script>
Thanks
Don