Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


The /map resource represents the mapping capabilities of Weave.

...

Top-level resource: services/v1/map


Sub-resources:

1

...

. /map/mapengines

Provides a list of all map engines configured and available on Weave.

Info
titleRelated reading

Map engine definition

Map engine configuration

...

Code Block
languagejs
collapsetrue
{
  "success": true,
  "mapengines": [
    {"id": "mapengine.upload"},
    {
      "acetate": false,
      "selection": false,
      "legend": true,
      "format": "image/png32",
      "id": "selection.area_details",
      "override": {"entity": {
        "id": "local_government_area",
        "content": "sld/LGA.sld"
      }},
      "orderCheck": false
    },
    {"id": "google.streets"},
    {
      "acetate": false,
      "selection": false,
      "legend": true,
      "format": "image/png32",
      "id": "selection.main",
      "override": {"polygon": {
        "stroke-width": 1,
        "fill-color": "red",
        "fill-opacity": 0.25,
        "stroke-color": "red"
      }},
      "orderCheck": false
    },
    {
      "acetate": false,
      "selection": false,
      "crs": "EPSG:3857",
      "tokens": {"token": {
        "name": "ITEMFONTSIZE",
        "value": 11
      }},
      "id": "nsw_imagery_wms",
      "url": "http://maps.six.nsw.gov.au/arcgis/services/public/NSW_Imagery/MapServer/WMSServer?VERSION=1.3.0"
    },
    {
      "acetate": false,
      "selection": false,
      "legend": true,
      "format": "image/png32",
      "id": "selection.property_details",
      "override": {"entity": {
        "id": "property",
        "content": "sld/Property.sld"
      }},
      "orderCheck": false
    },
    {
      "acetate": false,
      "id": "nswdpe.ov",
      "selection": false,
      "crs": "EPSG:3857",
      "url": "http://192.168.2.146:80/cgi-bin/qgis_mapserv.fcgi?map=/data/maps/nswdpe_ov.qgs&VERSION=1.3.0"
    },
 {
      "acetate": false,
      "selection": false,
      "crs": "EPSG:3857",
      "scales": {"scale": [
        {
          "maxScale": 1,
          "minScale": 1,
          "layer": "development_application"
        },
        {
          "maxScale": 1,
          "minScale": 1,
          "layer": "major_projects_jobs_lap"
        },
        {
          "maxScale": 1,
          "minScale": 1,
          "layer": "major_projects_sites_lap"
        }
      ]},
      "tokens": {"token": {
        "name": "ITEMFONTSIZE",
        "value": 11
      }},
      "id": "nswdpe",
      "url": "http://192.168.2.146:80/cgi-bin/qgis_mapserv.fcgi?map=/data/maps/nswdpe.qgs&VERSION=1.3.0"
    }
]
}




2

...

. /map/mapengines/{mapengineid}/layers

Provides a list of all map layers available for a given map engine.


Example 2 - 

Code Block
languagebash
themeEmacs
curl -X GET --header 'Accept: application/json' 'http://localhost:8080/weave/services/v1/map/mapengine/nswdpe/layers'

...

Code Block
languagejs
collapsetrue
{
  "success": true,
  "layers": [
    {
      "scaleRange": "<500000.0",
      "boundingBoxes": [
        "{minx: 142.269, miny: -37.5493, maxx: 153.695, maxy: -28.1079, crs: 'GEOGCS[\"WGS 84\", DATUM[\"World Geodetic System 1984\", SPHEROID[\"WGS 84\", 6378137.0, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], AUTHORITY[\"EPSG\",\"6326\"]], PRIMEM[\"Greenwich\", 0.0, AUTHORITY[\"EPSG\",\"8901\"]], UNIT[\"degree\", 0.017453292519943295], AXIS[\"Geodetic longitude\", EAST], AXIS[\"Geodetic latitude\", NORTH], AUTHORITY[\"EPSG\",\"4326\"]]'}",
        "{minx: 1.58373E7, miny: -4515950.0, maxx: 1.71093E7, maxy: -3262580.0, crs: 'PROJCS[\"WGS 84 / Pseudo-Mercator\", GEOGCS[\"WGS 84\", DATUM[\"World Geodetic System 1984\", SPHEROID[\"WGS 84\", 6378137.0, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], AUTHORITY[\"EPSG\",\"6326\"]], PRIMEM[\"Greenwich\", 0.0, AUTHORITY[\"EPSG\",\"8901\"]], UNIT[\"degree\", 0.017453292519943295], AXIS[\"Geodetic longitude\", EAST], AXIS[\"Geodetic latitude\", NORTH], AUTHORITY[\"EPSG\",\"4326\"]], PROJECTION[\"Popular Visualisation Pseudo Mercator\", AUTHORITY[\"EPSG\",\"1024\"]], PARAMETER[\"semi_minor\", 6378137.0], PARAMETER[\"latitude_of_origin\", 0.0], PARAMETER[\"central_meridian\", 0.0], PARAMETER[\"scale_factor\", 1.0], PARAMETER[\"false_easting\", 0.0], PARAMETER[\"false_northing\", 0.0], UNIT[\"m\", 1.0], AXIS[\"Easting\", EAST], AXIS[\"Northing\", NORTH], AUTHORITY[\"EPSG\",\"3857\"]]'}"{
  "success": true,
  "mapengines": [
    {
      "id": "mapengine.upload"
    },
    {
      "acetate": false,
      "selection": false,
      "legend": true,
      "format": "image/png32",
      "id": "selection.area_details",
      "override": {
        "entity": {
          "id": "local_government_area",
          "content": "sld/LGA.sld"
        }
      },
      "orderCheck": false
    },
    {
      "id": "google.streets"
    },
    {
      "acetate": false,
      "selection": false,
      "legend": true,
      "format": "image/png32",
      "id": "selection.main",
      "override": {
        "polygon": {
          "stroke-width": 1,
          "fill-color": "red",
          "fill-opacity": 0.25,
          "stroke-color": "red"
        }
      },
      "orderCheck": false
    },
    {
      "acetate": false,
      "selection": false,
      "crs": "EPSG:3857",
      "tokens": {
        "token": {
          "name": "ITEMFONTSIZE",
          "value": 11
        }
      },
      "id": "nsw_imagery_wms",
      "url": "http://maps.six.nsw.gov.au/arcgis/services/public/NSW_Imagery/MapServer/WMSServer?VERSION=1.3.0"
    },
    {
      "acetate": false,
      "selection": false,
      "legend": true,
      "format": "image/png32",
      "id": "selection.property_details",
      "override": {
        "entity": {
          "id": "property",
          "content": "sld/Property.sld"
        }
      },
      "orderCheck": false
    },
    {
      "acetate": false,
      "id": "nswdpe.ov",
      "selection": false,
      "crs": "EPSG:3857",
      "url": "http://192.168.2.146:80/cgi-bin/qgis_mapserv.fcgi?map=/data/maps/nswdpe_ov.qgs&VERSION=1.3.0"
    },
    {
      "acetate": false,
      "selection": false,
      "crs": "EPSG:3857",
      "scales": {
        "scale": [
          {
            "maxScale": 1,
            "minScale": 1,
            "layer": "development_application"
          },
          {
            "maxScale": 1,
            "minScale": 1,
            "layer": "major_projects_jobs_lap"
          },
          {
            "maxScale": 1,
            "minScale": 1,
            "layer": "major_projects_sites_lap"
          }
        ]
      },
      "tokens": {
        "token": {
          "name": "ITEMFONTSIZE",
          "value": 11
        }
      },
      "id": "nswdpe",
      "url": "http://192.168.2.146:80/cgi-bin/qgis_mapserv.fcgi?map=/data/maps/nswdpe.qgs&VERSION=1.3.0"
    }
  ]
}


3

...

. /map/show

Represents the map imaging capabilities of Weave. This resource supports both HTTP GET and HTTP POST requests. A GET request may specify a map images from a single map engine whereas a POST request may specify a composite image consisting of multiple images sourced from different map engines. POST requests may also specify selections which can be drawn using a specially configured 'selection map engine' in Weave.

Parameters

3.1. GET query parameters

mapengine.id - string - map engine identifier as per configuration

...

opacity - decimal - image  transparency as a decimal <= 1.0


3.2. Sample POST body parameter

...

Note
Producing a single map image by combining a number of map images sourced from multiple map engines is a resource - intensive process. Where Weave application's resources are constrained, this approach is not recommended for implementing live map clients. Instead it is recommended that images (with an opacity less than 1) are superimposed as separate layers at the client end.

...