Geoportal SDK 2D/3D API Reference

Module: Utils/MapLoader

Gp.Map.load()

Geoportal map loader.

Provide convenience method to create a Map and attach it to a HTML element.

Methods

staticload(div, mapOptions){Gp.Map}

Utils/MapLoader.js, line 12

Initialize a Geoportal map in an HTML element.

Name Type Description
div String | DOMElement

The HTML element or its id where the map will be loaded.

mapOptions Gp.MapOptions optional

Options for loading the map.

Returns:
Geoportal map.
Example
Gp.Map.load(
         'geoportalMap',
         {
             apiKey : "YOUR_API_KEY",
             center : {
                 location : "rue pasteur, Saint-Mandé"
             },
             zoom : 16,
             layersOptions : {
                 'GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD' : {}
             }
         }
     );