View map data (GISMAP Plugin)

Dec 10, 2019 10:07:47 PM Thomas Dumont avatar

View map data with the GISMAP Plugin


Description of the plugin

The GISMAP Plugin provides a basic base for displaying map data within a Lutèce application.
Its implementation is based on the booksellers OpenLayers.

This plugin allows the display of spatial data from :

  • Various formats
    • WMTS, WMS, WFS
    • GeoJson
  • Many map servers
    • GeoServer
    • ArcGis Server
  • Various suppliers
    • CapGeo (Spatial Data Infrastructure of the Paris City Hall)
    • ArcGis On Line (Esri)
    • OpenStreetMap

New 2018: Possibility to display immersive views (Data available on Paris only)

The map viewer integrates the main standard cartographic navigation features :

  • Zoom, Pan
  • Location from a GPS position,
  • North Arrow, Map Orientation (Rotate)
  • Data layer display management tool
  • Display cursor coordinates
  • Drawing tools, distance or surface measurement tools
  • Popup display attribute information
  • Reprojection of data
  • Positioning card
  • Full screen display

GISMAP map

The process consists in creating a plugin or module lutece including the plugin-gismap and bringing the implementations java interfaces in the code server.

Inclusion of the plugin

Include the plugin-gismap in the pom.xml of the plugin or module specifying the latest version :

<dependency>
    <groupId>fr.paris.lutece.plugins</groupId>
    <artifactId>plugin-gismap</artifactId>
    <version>2.0.0</version>
    <type>lutece-plugin</type>
</dependency>

Instantiate a GISMAP map

Declare a new instance of GISMAP to initialize the map :

var GisMapDisplay = new GisMap(idMap, idInit);
GisMapDisplay.initGisMap(globalParameters, fieldParameters0);

in which :

  • globalParameters contains the properties of the gismap.properties file.
  • fieldParameters0 contains the dynamic parameters transmitted by Lutèce.

Power of the card by webservice of publication of business data

To display the business data on the map, you must publish a GEOJSON webservice of REST type. Since the webservice returns JSONP, it must have an input parameter as input and return this callback parameter with the GEOJson points list.

In the HTML page, the feed is done using the filterLayerGEOJSON() method.

Example :

GisMapDisplay.getFilter().filterLayerGEOJSON('MaCoucheMetier', 'EPSG:2154','/MonSite/rest/FRWS/MonService?MonParam='+ValParam,'static');

Where :

  • 'MyMoilSteel' is the name of the business layer
  • 'EPSG: 2154' is the code of the projection of geographical data published by the webservice
  • '/ MySite / rest ...' is the URL of the webservice (it can have parameters)
  • 'Static' is the Display Strategy (see documentation for more details)