Geoportal SDK 2D/3D API Reference

Index

Geoportal SDK API Reference

The Geoportal SDK (Software Developement Kit) is an integrated javascript API that allows web application developpers to easyly integrate dynamic geoportal based maps on a web page.

It is a wrapper over the following libraries :

Basic usage

Create a Map and attach it to your web page with the Gp.Map.load() function. It returns a Gp.Map object which provides methods to interact with the created map.

Example :

var map = Gp.map.load(
    "mapDiv",                     // html element id  where to attach the map
    {                             // mapOptions
        apiKey : "YOUR_API_KEY",  // geoportal access key
        viewMode : "3d",          // "2d" by default.
        center : {                // -> map center params
            location : "73 avenue de Paris, Saint-Mandé"
        },
        zoom : 16,                // -> zoom level
        layersOptions : {         // -> map layers params
            "ORTHOIMAGERY.ORTHOPHOTOS" : {}
        }
    }
) ;

Functionalities

Geoportal SDK provides a simple Application Programmation Interface that allows developers to create a map with the following possibilities :

Map and view positionning (center, orientation and zoom).

See Gp.MapOptions properties : center, azimuth, zoom, ... and Gp.Map dedicated methods : Gp.Map.setCenter(), Gp.Map.setAzimuth(), Gp.Map.setZoom(), ...

Map composition (layers composition and markers positioning)

See Gp.MapOptions properties : layerOptions and markerOptions and Gp.Map dedicated methods : Gp.Map.addLayers(), Gp.Map.modifyLayers(), Gp.Map.removeLayers(), ...

See Gp.LayerOptions to have a overview of layer types availables.

Providing various interaction tools for end users

See Gp.MapOptions property : controlsOptions and Gp.Map dedicated methods : Gp.Map.addControls(), Gp.Map.modifyControls(), Gp.Map.removeControls(), ...

See Gp.ControlOptions to have a list of tools availables.

Being able to react to end users interactions with the map.

See Gp.MapOptions property : mapEventsOptions and Gp.Map dedicated methods : Gp.Map.listen(), Gp.Map.forget().

Advanced Functionalities

If you want more functionalities, you will then have to use those offered by :

Also note that the Geoportal Access library API is also available with the Geoportal SDK.