Class: Geoportail

ol.source. Geoportail


new Geoportail( [layer] [, options])

IGN's Geoportail WMTS source

Parameters:
Name Type Argument Description
layer String <optional>

Layer name.

options olx.source.OSMOptions <optional>

WMTS options

Properties
Name Type Description
minZoom number
maxZoom number
server string
gppKey string

api key, default 'choisirgeoportail'

authentication string

basic authentication associated with the gppKey as btoa("login:pwd")

format string

image format, default 'image/jpeg'

style string

layer style, default 'normal'

crossOrigin string

default 'anonymous'

wrapX string

default true

Extends

  • ol.source.WMTS

Members


attribution

Standard IGN-GEOPORTAIL attribution

Methods


<static> tileLoadFunctionWithAuthentication(authentication, format)

Get a tile load function to load tiles with basic authentication

Parameters:
Name Type Description
authentication string

as btoa("login:pwd")

format string

mime type

Returns:

tile load function to load tiles with basic authentication

Type
function

getFeatureInfo(coord, resolution, projection, options)

Get feature info

Parameters:
Name Type Description
coord ol.Coordinate
resolution Number
projection ol.proj.Projection

default the source projection

options Object
Properties
Name Type Description
INFO_FORMAT string

response format text/plain, text/html, application/json, default text/plain

callback function

a function that take the response as parameter

error function

function called when an error occurred


getFeatureInfoUrl(coord, resolution, projection, options)

Return the GetFeatureInfo URL for the passed coordinate, resolution, and projection. Return undefined if the GetFeatureInfo URL cannot be constructed.

Parameters:
Name Type Description
coord ol.Coordinate
resolution Number
projection ol.proj.Projection

default the source projection

options Object
Properties
Name Type Description
INFO_FORMAT string

response format text/plain, text/html, application/json, default text/plain

Returns:

GetFeatureInfo URL.

Type
String | undefined

getGPPKey()

Return the associated API key of the Map.

Returns:

the API key.


serviceURL()

Get service URL according to server url or standard url


setGPPKey(key, authentication)

Set the associated API key to the Map.

Parameters:
Name Type Description
key String

the API key.

authentication String

as btoa("login:pwd")