EasyGIS API

The EasyGIS API is developed to enable the use of EasyGIS module as a widget in an external webpage. Usage of the EasyGIS API requires an API key. A key can be requested via info@easygis.eu.

1. General

To load the EasyGIS API, place the following code in the body of your html document, preferably directly before the </body>.

<script type="text/javascript" src="https://api.easygis.eu/js/latest.js">

2. Modules

With the EasyGIS API it is possible to load different modules. This can be done using JavaScript by calling easygis.loadModule() after loading the API. The function easygis.loadModule() requires a single argument - consisting of an object - which determines the desired configuration. The following properties are required:

Example
<!DOCTYPE html>
<html>
<head>
  ...
</head>
<body>
  ...
  <div id="show-me-here"></div>
  ...
  <script type="text/javascript" src="https://api.easygis.eu/js/latest.js"></script>
  <script type="text/javascript">
    easygis.loadModule({
      key: 'ah5lf345yt274q2r234dq3464g563qy',
      module: easygis.Module.MODULE,
      target: 'show-me-here'
    });
  </script>
 </body>
</html>

2.1 Notification module

For the notification module use the following module tag: easygis.Module.REPORTINGPOINT.

Example
    
...
<script type="text/javascript">
  easygis.loadModule({
    ...
    module: easygis.Module.REPORTINGPOINT,
    ...
  });
</script>
    

2.2 Planner

For the planner use the following module tag: easygis.Module.ROUTEPLANNER.

Example
    
...
<script type="text/javascript">
  easygis.loadModule({
    ...
    module: easygis.Module.ROUTEPLANNER,
    ...
  });
</script>
    

2.2.1 Category

A category must be specified using the category tag. The following categories can are available:

Example
    
...
<script type="text/javascript">
  easygis.loadModule({
    ...
    module: easygis.Module.ROUTEPLANNER,
    category: easygis.Category.CYCLING,
    ...
  });
</script>
    

2.2.2 Language

The language in which the route planner is displayed can be set via the lang tag. The following (ISO 639-1) codes are available:

Example
    
...
<script type="text/javascript">
  easygis.loadModule({
    ...
    key: '...',
    module: easygis.Module.ROUTEPLANNER,
    lang: "nl",
    ...
  });
</script>
    

2.2.3 (Thematic) route

You can specify a route code using the code tag. A planned route or a thematic route code can be used.

Example
    
...
<script type="text/javascript">
  easygis.loadModule({
    ...
    key: '...',
    module: easygis.Module.ROUTEPLANNER,
    category: easygis.Category.CYCLING,
    code: 'abcde'
    ...
  });
</script>
    

2.2.4 Zoom & Location

A initial zoom level can be indicated using the zoom tag (0 < zoom < 19 ).

A specify an initial location to center the map can be specified using the center tag. The location must have a lat and long property in WGS84. Tip: Use Google Maps to easily find the coordinate of a location

Example
    
...
<script type="text/javascript">
  easygis.loadModule({
    ...
    module: easygis.Module.ROUTEPLANNER,
    category: easygis.Category.CYCLING,
    zoom: 11,
    center: {lat: 50.3, long: 5.1}
    ...
  });
</script>
    

2.3 POI widget

For the POI widget module use the following module tag: easygis.Module.POIWIDGET.

Exmaple
    
...
<script type="text/javascript">
  easygis.loadModule({
    ...
    key: '...',
    module: easygis.Module.POIWIDGET,
    ...
  });
</script>
    

2.2.3 Point of interest

A specific POI can specified using the uuid tag. You can find the UUID in the management system.

Example
    
...
<script type="text/javascript">
  easygis.loadModule({
    ...
    key: '...',
    module: easygis.Module.POIWIDGET,
    uuid: 'a1b2c3d4-a1b2-a1b2-a1b2-a1b2c3d4e5f6'
    ...
  });
</script>