Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Does anyone know how to change the QGIS Web Client measure tool (distance and area) so that it shows feet or miles rather than meters?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

you have to change some code in qgis-web-client / site / js / WebgisInit.js you can add unit parameter to OpenLayers.Control.Measure method. you have to do this for polygon too...

measureControls = {
    line: new OpenLayers.Control.Measure(
      OpenLayers.Handler.Path, {
        persist: true,
        units:'ft',
        handlerOptions: {
          layerOptions: {styleMap: styleMapMeasureControls}
        }
      }
    )

other units are ‘degrees’ (or ‘dd’), ‘m’, ‘ft’, ‘km’, ‘mi’, ‘inches’..

i hope it helps you....

share|improve this answer
    
Thanks for the quick reply. Unfortunately this doesn't work for me under Linux Mint 12. I even went so far as to download the latest QGIS Web Client code and re-configure. The measure distance tool still shows units in meters and kilometers rather than feet and miles. In a perfect world, QGIS Web Client would use the same units as the coordinate system. Or at least it should be configurable inside GlobalOptions.js. BTW, I changed the units from 'degrees' to 'ft' inside GlobalOptions.js and still no go. Any other suggestions? –  Rayner May 18 '12 at 19:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.