Map options object.
Holds options for map creation when using Gp.Map.load() function.
Availables options are described below.
- Common 2D/3D properties
property | Type | Argument | Default | Description |
---|---|---|---|---|
apiKey | String / Array. |
generic access key(s) to Geoportal platform, obtained here | ||
viewMode | String | optional | "2d" | Library to load the map with. Values are :
|
center | Gp.Center | optional | Map Centering information. Either with coordinates, with geoportal geocoding service or with user geo-localization. | |
azimuth | Float | optional | 0 | Map orientation in decimal degrees clockwise to the north. |
zoom | Integer / Float | optional | 10 | Zoom level, between 0 (world wide zoom) and 21 (street wide zoom). |
defaultFeaturesStyle | Gp.StyleOptions | optional | Default style options for vector layers features (KML, GPX, GeoJSON). | |
layersOptions | Object | optional | Layers to add to the map and their options. Associative array mapping ids of layers to display and their properties. For each layer, the id may be either the name of a Geoportal layer (eg : "ORTHOIMAGERY.ORTHOPHOTOS") available with the given apiKey or an id of your choice for external resources. The properties associated to each ID are given as Gp.LayerOptions. For Geoportal Layers availables with the given apiKey, values are automaticaly fetched from key configuration. You only need to specify a Gp.LayerOptions Object with properties you want to overide. |
|
controlsOptions | Object | optional | Controls to add to the map and their options. Associative array mapping the control's name (keys) with a Boolean (value) for activating / deactivating or with their properties (values given as Gp.ControlOptions). See Gp.ControlOptions for availables controls list and their properties. | |
mapEventsOptions | Object | optional | Map's events to listen for interaction. Associative array mapping an event from the map (keys) with a function triggered by this event (values given as {Function}). See Gp.Map.listen() for available event Ids and their associated events objects. | |
minZoom | Integer | optional | 0 | Zoom level beyond which the user can't zoom out. |
maxZoom | Integer | optional | 21 | Zoom level beyond which the user can't zoom in. |
customConfigFile | String | optional | Geoportal config url to use instead of the default dynamic configuration service based on apiKey param. | |
reloadConfig | Boolean | optional | true | Disable / enable use of the Config service. If true, the configuration service is load for loading the map. If false, the configuration is not used, if customConfigFile is not specified and if apiKey is specified. Only use if you know what you're doing. |
proxyUrl | String | optional | Proxy URL to avoid cross-domain problems on external resources. Only use if you know what you're doing. | |
noProxyDomains | Array. |
optional | Proxy will not be used for this list of domain names. Only use if you know what you're doing. |
- Specific 2D options
property | Type | Argument | Default | Description |
---|---|---|---|---|
enableRotation | Boolean | optional | true | Map rotation. Default is true. If false a rotation constraint that always sets the rotation to zero is used. |
markersOptions | Array.<Gp.MarkerOptions> | optional | Options for displaying markers on the map. Options are kept in case of switch 2D<->3D | |
projection | String | optional | "EPSG:3857" | Projection code (in EPSG or IGNF register) for the map. Not available in 3D as the projection is always "EPSG:4326" |
extent | Array | optional | Forced extent of the view, with the format [west, south, east, north], with the projection of the map |
- Specific 3D options
property | Type | Argument | Default | Description |
---|---|---|---|---|
tilt | Float | optional | 0 | Camera gradient in decimal degrees. 0 for a vertical view. 90 for an horizontal view. |
isWebGL2 | Boolean | optional | true | Parameter to enable webgl 2.0. |