new Carte(options)
Constructor
Parameters:
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
* |
Properties
|
- Source:
- Carte.js
Fires:
- event:loading
- read:start
- event:read
- event:error
- event:authenticate
Methods
-
addSymbolLib(options, name [, feature] [, style] [, type])
-
Add a feature style to the symbol lib
Parameters:
Name Type Argument Description optionsoptions namestring symbol name
featureFeature <optional>
feature the feature to get symbol, if none give a style / type
styleignStyle <optional>
style to apply (if no feature)
typestring <optional>
geometry type Point|LineString|Polygon
- Source:
- Carte.js
Returns:
the symbol or false
- Type
- SymbolLib
-
authenticate( [cback] [, errro])
-
Authenticate carte when layers are private / Espace co
Parameters:
Name Type Argument Description cbackfunction <optional>
a callback function when authenticated
errroboolean <optional>
true if an error occured (internal)
- Source:
- Carte.js
Fires:
- event:authenticate
-
dialogInfo()
-
Show carte info dialog
- Source:
- Carte.js
-
getControl(name)
-
Get map control
Parameters:
Name Type Description namestring - Source:
- Carte.js
Returns:
- Type
- Control
-
getDialog()
-
Get a dialog
- Source:
- Carte.js
-
getInteraction(name)
-
Get interaction
Parameters:
Name Type Description namestring - Source:
- Carte.js
Returns:
- Type
- ol.interaction.Interaction
-
getMap()
-
Get the ol map
- Source:
- Carte.js
Returns:
- Type
- Map
-
getSelect()
-
Get select interaction
- Source:
- Carte.js
Returns:
- Type
- Select
-
getSymbolLib( [what])
-
Get the list of symbol lib
Parameters:
Name Type Argument Description whatnumber | string <optional>
the index or the name of the style, if non return the whole list
- Source:
- Carte.js
Returns:
return null if not found
- Type
- Collection.<symbolLib> | symbolLib
-
getTitle()
-
Get carte title
- Source:
- Carte.js
Returns:
- Type
- string
-
getToolbar()
-
Get Tool bar
- Source:
- Carte.js
Returns:
- Type
- Control
-
getViewerUrl(carte)
-
Get the map viewer url
Parameters:
Name Type Description carteObject Properties
Name Type Argument Default Description showTitleboolean <optional>
true noZoomboolean <optional>
false positionArray.<number> <optional>
- Source:
- Carte.js
Returns:
viewer url
- Type
- string
-
hasControl(name)
-
Map has control
Parameters:
Name Type Description namestring control id
- Source:
- Carte.js
Returns:
- Type
- boolean
-
load(c)
-
Load carte from server
Parameters:
Name Type Description cAtlasDef | string Carte definition or the carte id
- Source:
- Carte.js
-
notification(what [, duration])
-
Display a notification on the map
Parameters:
Name Type Argument Default Description whatstring | node | undefined the notification to show, default get the last one
durationnumber <optional>
3000 duration in ms, if -1 never hide
- Source:
- Carte.js
-
popupFeature(feature, coord)
-
Show a popup
Parameters:
Name Type Description featureFeature coordol.coordinate - Source:
- Carte.js
-
read(options [, atlas])
-
Read the carte
Parameters:
Name Type Argument Default Description optionsstring | * carte url or carte options object
atlasAtlasDef <optional>
{} - Source:
- Carte.js
-
setParent(parent)
-
Set parent Storymap
Parameters:
Name Type Description parentStory - Source:
- Carte.js
-
setReady()
-
Show map on ready
- Source:
- Carte.js
-
setSelection(feature [, select])
-
Set current selection
Parameters:
Name Type Argument Description featureFeature selectstring <optional>
name: select, select1 or select2
- Source:
- Carte.js
-
setSelectStyle(options)
-
Get select interaction
Parameters:
Name Type Description optionsObject Properties
Name Type Description typestring selection type default|zoom|overlay
pointsboolean show points on lines
- Source:
- Carte.js
-
showControl(name [, show])
-
Show/hide a control
Parameters:
Name Type Argument Default Description namestring control id
showboolean <optional>
true - Source:
- Carte.js
-
write( [uncompressed])
-
Save a storymap
Parameters:
Name Type Argument Default Description uncompressedboolean <optional>
false - Source:
- Carte.js
Returns:
- Type
- Object
-
zoomToClusterExtent(features)
-
Zoom map to features extend
Parameters:
Name Type Description featuresArray.<ol.Feature> features you want to zoom to
- Source:
- Carte.js