var territories = new ol.control.Territories({
collapsed: true,
panel: true,
auto: true
});
map.addControl(territories);
or/and
var territories = new ol.control.Territories({});
territories.setTerritory({id: "MTQ", title: "Martinique", description: "", bbox: [], thumbnail: "data:image/png;base64,..."});
territories.setTerritory({id: "GLP", title: "Guadeloupe", description: "", bbox: [], thumbnail: "http://..."});
map.addControl(territories);
specify if we load the list of territories by default
Protected
disposedThe object has already been disposed.
Protected
listenerlist of object territories
Key name.
Listener.
Type.
Listener.
Protected
applyProtected
Apply any properties from another object without triggering events.
The source object.
Dispatches an event and calls all listeners listening for events
of this type. The event parameter can either be a string or an
Object with a type
property.
Event object.
false
if anyone called preventDefault on the
event object or if any of the listeners returned false.
Clean up.
Protected
disposeProtected
Extension point for disposable objects.
Get container
container
Get the listeners for a specified event type. Listeners are returned in the order that they will be called in.
Type.
Listeners.
Get an object of all property names and values.
Object.
Optional
type: stringType. If not provided,
true
will be returned if this event target has any listeners.
Has listeners.
The object has properties.
Key name.
Old value.
Protected
onceProtected
onKey name.
Listener.
Type.
Listener.
Remove all territories
Overwrite OpenLayers setMap method
Map.
Mode reduit des tuiles (uniquement le nom du territoire)
true|false
This function is used to set a target element for the control. It has no
effect if it is called after the control has been added to the map (i.e.
after setMap
is called on the control). If no target
is set in the
options passed to the control constructor and if setTarget
is not called
then the control is added to the map's overlay container.
Target.
Load a new configuration
file config
Protected
unProtected
Unlisten for a certain type of event.
Type.
Listener.
options for function call.