Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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,
        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


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.