Skip to content

Latest commit

 

History

History
66 lines (59 loc) · 1.78 KB

File metadata and controls

66 lines (59 loc) · 1.78 KB

Measure

Simple mapfishapp addon to perform distance and area measurements. ... was originally part of mapfishapp codebase, ported to an addon for the 15.12 release.

Author: @fvanderbiest

Setup

Edit the GEOR_custom.js file to add the required configuration for this addon:

ADDONS: [...,
{
    "id": "measure_0",
    "name": "Measure",
    "options": {},
    "title": {
        "en": "Measurement tools",
        "es": "Herramientas de medición",
        "fr": "Outils de mesure",
        "de": "Messwerkzeuge"
    },
    "description": {
        "en": "Distance and area measuring tools",
        "es": "Herramientas de medición de superficies y distancias",
        "fr": "Outils de mesure de distances et de surfaces",
        "de": "Werkzeuge zum Messen von Entfernungen und Flächen"
    }
}], ...

Note that it is also possible to:

  • alter the default drawing style with the graphicStyle option
  • change the number of decimals in a measure with the decimals option (defaults to 2)

eg:

    "options": {
        "decimals": 1,
        "graphicStyle": {
            "Point": {
                "pointRadius": 4,
                "graphicName": "square",
                "fillColor": "white",
                "fillOpacity": 1,
                "strokeWidth": 1,
                "strokeOpacity": 1,
                "strokeColor": "#333333"
            },
            "Line": {
                "strokeWidth": 3,
                "strokeOpacity": 1,
                "strokeColor": "#666666",
                "strokeDashstyle": "dash"
            },
            "Polygon": {
                "strokeWidth": 2,
                "strokeOpacity": 1,
                "strokeColor": "#666666",
                "fillColor": "white",
                "fillOpacity": 0.3
            }
        }
    },