Members
-
<constant> fullscreen
-
A fullscreen Overlayer to display an image
- Source:
- dialog/fullscreen.js
Example
fullscreen.showImage(src, { title: 'my image' }); -
<constant> guichetAPI
-
Singleton
- Source:
- guichet/api.js
-
I18N
-
Internationalization singleton
- Source:
- i18n/i18n.js
-
<constant> notification
-
A notification object to display non-intrusive information See ol/control/Notification
- Source:
- dialog/notification.js
Examples
import notification from 'mcutils/dialog/notification' notification.show('Hello World!', 3000);// Display a cancel message import notification from 'mcutils/dialog/notification' notification.cancel('One feature deleted', cancelCallbackFn, 'annuler' ));
Methods
-
_T(s [, empty])
-
i18n : InternationlizatioN tools Internationalization is defined through i18n oject
Parameters:
Name Type Argument Default Description sstring string to translated
emptyboolean <optional>
false return the key string if not defined
- Source:
- i18n/i18n.js
Returns:
the translated string or the string itself or empty string if empty=true
- Type
- string
Example
i18n.set('fr', { test: 'This is a test' }); console.log(_T('test')); // Output > This is a test -
_uploadMediaDialog(media [, getError], folders)
-
Dialog to upload a new media
Parameters:
Name Type Argument Default Description mediaObject options.callbackfunction a function that get the uploaded media
getErrorboolean <optional>
false true to get the error if one
foldersArray.<string> - Source:
- dialog/openMedia.js
-
addMediaDialog(options, folders)
-
Dialog to upload a new media
Parameters:
Name Type Description optionsObject Properties
Name Type Argument Default Description callbackfunction a function that get the uploaded media
getErrorboolean <optional>
false true to get the error if one
teamboolean <optional>
true use false to add a user media (out of current team)
foldersArray.<string> foldersArray.<string> - Source:
- dialog/openMedia.js
-
checkShare(share, cartes)
-
Check share between story and cartes
Parameters:
Name Type Description sharestring cartesArray.<Object> - Source:
- dialog/saveCarte.js
-
checkStoryShare(story, callback)
-
Check share between story and included cartes
Parameters:
Name Type Description storyObject callbackfunction - Source:
- dialog/saveCarte.js
-
connectDialog(callback, error)
-
Connexion au services
Parameters:
Name Type Description callbackfunction a function called when connected
errorstring error message
- Source:
- charte/macarte.js
-
embedCarte(options [, carte])
-
Share dialog
Parameters:
Name Type Argument Description optionsObject Properties
Name Type Argument Default Description promptstring <optional>
'Partager votre carte' Dialog title
carteStoryMap | Carte | Object <optional>
the story or carte to share
- Source:
- dialog/embedCarte.js
-
getAuth()
-
Get current authentification
- Source:
- guichet/api.js
Returns:
- Type
- string
-
getConditionStyle()
-
Get style for layer condition
- Source:
- style/ignStyleFn.js
-
getFeatureStyle()
-
Get style for feature
- Source:
- style/ignStyleFn.js
-
getField(rex, fields)
-
Get field by name
Parameters:
Name Type Description rexRegExp fieldsArray.<string> - Source:
- format/CSV.js
Returns:
-
getGppKey(key, layer)
-
Get the Geoplatforme api key for a layer
Parameters:
Name Type Description keystring default key
layerstring layer name
- Source:
- layer/Geoportail.js
-
getLayerSwitcher()
-
Return the layers switcher
- Source:
- control/layerSwitcher.js
-
getMediaFolderDialog(options, callback)
-
Get media folder dialog
Parameters:
Name Type Description optionsObject Properties
Name Type Description foldersArray.<string> promptstring callbackfunction a function that get the uploaded media
- Source:
- dialog/getMediasFolderDialog.js
-
getPoint(c, pointField, lonField, latField)
-
Get field as POINT(lon lat)
Parameters:
Name Type Description cObject pointFieldstring lonFieldstring latFieldstring - Source:
- format/CSV.js
-
getPointField(rex, fields)
-
Get field with POINT(x,y)
Parameters:
Name Type Description rexRegExp fieldsArray.<string> - Source:
- format/CSV.js
Returns:
-
getSimpleGeomType(type)
-
Get geometry type as Point/LineString/Polygon
Parameters:
Name Type Description typestring - Source:
- geom/getSimpleGeomType.js
-
helpData(content)
-
Handles data-help
Parameters:
Name Type Description contentelement - Source:
- dialog/helpDialog.js
-
helpDialog(elt, md [, options] [, title] [, className])
-
Add an help dialog on an element
Parameters:
Name Type Argument Default Description eltElement an I element to connect the help or an element to add a I element
mdstring dialog content as markdown
optionsObject <optional>
titlestring <optional>
"aide..." classNamestring <optional>
large small large or medium
- Source:
- dialog/helpDialog.js
-
inputFolderList(folders, parent)
-
Create an input folder list
Parameters:
Name Type Description foldersArray.<string> parentElement - Source:
- dialog/getMediasFolderDialog.js
Returns:
input element
- Type
- Element
-
<package> isNumber()
-
Check if is a number is finite or NaN
- Source:
- format/CSV.js
Returns:
- Type
- boolean
-
mdFeatureSelect(feature)
-
Display feature info on select
Parameters:
Name Type Description featureFeature - Source:
- md/mdFeatureSelect.js
Returns:
true if display in the md element
- Type
- boolean
-
openCarte(options)
-
Open dialog
Parameters:
Name Type Description optionsObject Properties
Name Type Argument Default Description callbackfunction a function that get a carte to open
titlestring <optional>
'Charger une carte' dialog title
filterstring <optional>
carte type 'macarte' or 'storymap', default all
typestring <optional>
carte type 'macarte' or 'storymap', default all
- Source:
- dialog/openCarte.js
-
openMedia(options)
-
Open media dialog
Parameters:
Name Type Description optionsObject Properties
Name Type Argument Default Description callbackfunction a function that get a file to open
titlestring <optional>
'Choisir un média' dialog title
thumbboolean <optional>
false thumbnail default checkbox value
addboolean <optional>
true ajouter un media
- Source:
- dialog/openMedia.js
-
read()
-
Read a page
- Source:
- layer/ECReport.js
-
removeDiacritics(str)
-
Remove diacritics (accents and spciel letters)
Parameters:
Name Type Description strstring - Source:
- config/removeDiacritics.js
Returns:
- Type
- string
-
render2Feature(feature)
-
Convert RenderFeature to feature
Parameters:
Name Type Description featureRenderFeature - Source:
- ol/Feature.js
Returns:
- Type
- Feature
-
roundCoords(coords [, n])
-
Round coordinates
Parameters:
Name Type Argument Default Description coordsCoordinates nnumber <optional>
1000 - Source:
- format/layer/roundCoords.js
Returns:
- Type
- Coordinates
-
saveCarte(carte, callback, options)
-
Save dialog
Parameters:
Name Type Description carteCarte | StoryMap | AtlasDef the StoryMap or Carte or an atals object. The object is modified in place.
callbackfunction a callback function that takes the current carte and save optionsCarte
optionsObject Properties
Name Type Argument Default Description promptstring <optional>
'Enregistrer une carte' classNamestring <optional>
saveAsboolean <optional>
false - Source:
- dialog/saveCarte.js
-
setCarousel( [elt])
-
Set an element as carousel Should contains a list of diapo (as ul)
Parameters:
Name Type Argument Description eltElement <optional>
if not defined will get all data-role="carousel" elements
- Source:
- charte/carousel.js
-
shareCarte(options)
-
Share dialog
Parameters:
Name Type Description optionsObject Properties
Name Type Argument Default Description promptstring <optional>
'Partager votre carte' Dialog title
carteStoryMap | Carte | Object <optional>
the story or carte to share
targetElement <optional>
element to place in (default: a dialog)
- Source:
- dialog/shareCarte.js
-
showCalendar()
-
Create calendar
- Source:
- md/mdCalendar.js
-
showHelp(md [, options] [, title] [, className])
-
Show an help dialog
Parameters:
Name Type Argument Default Description mdstring dialog content as markdown
optionsObject <optional>
titlestring <optional>
"aide..." classNamestring <optional>
large small large or medium
- Source:
- dialog/helpDialog.js
-
teamSelector( [parent])
-
Create a team select element
Parameters:
Name Type Argument Description parentElement <optional>
- Source:
- api/ListTeams.js
Returns:
- Type
- teamSelectorCtrl
-
toSLD(con)
-
Convert condition style to SLD (for statistic layers)
Parameters:
Name Type Description conArray.<conditionStyle> - Source:
- style/conditionStyle.js
-
update()
-
Update reports layer
- Source:
- layer/ECReport.js
-
updateMediaDialog(options)
-
Dialog to modify a media
Parameters:
Name Type Description optionsObject Properties
Name Type Argument Default Description callbackfunction a function that get the uploaded media
mediaMCMedia true to get the error if one
titlestring <optional>
dialog title
getErrorboolean <optional>
false true to get the error if one
foldersArray.<string> a list of folders
- Source:
- dialog/openMedia.js
Type Definitions
-
AtlasDef
-
Atlas definition
Type:
- Object
- Source:
- StoryMap.js
Properties:
Name Type Description typestring Map type
titlestring Map title in the atlas
descriptionstring Map description in the atlas
updated_atstring Map update date
nb_viewnumber img_urlstring Map image url
userstring themestring Map theme
theme_idnumber Map theme ID
sharestring map share 'atlas'
premiumstring validboolean activeboolean title_urlstring title as set in url
view_idstring view ID
view_urlstring url to view the carte
edit_idstring edition id (if can edit)
edit_urlstring url for edition (if can edit)
-
conditionStyle
-
Condition style
Type:
- Object
- Source:
- style/conditionStyle.js
Properties:
Name Type Description titlestring conditionsymbol -
statisticParam
-
Parameters for statistic calculation
Type:
- Object
- Source:
- layer/statistic.jsdoc
Properties:
Name Type Argument Default Description typeMapstring <optional>
choroplethe choroplethe,categorie,symbol,sectoriel,heatmap
colsArray.<string> list of columns to use
modestring <optional>
q class mode c(=custom), q(=quantile), k(=k-means), l(=logarithmic) or e(=equidistant)
nbClassnumber <optional>
5 number of classes
symbolstring <optional>
'' symbol name to use in as symbol point
rminnumber <optional>
3 min radius (symbol/sectoriel), if < 0 mean proportional radius
rmaxnumber <optional>
20 max radius (symbol/sectoriel)
strokeol/colorLike <optional>
true has stroke
limitsArray.<number> <optional>
Statistics classes limit values
alphanumber <optional>
1 alpha (for points)
chartTypestring <optional>
pie pie,pie3D, donut or bar
hradiusnumber <optional>
5 heatmap radius
hblurnumber <optional>
15 heatmap blur
brewerColorsArray.<string> <optional>
list of brewer colors
-
teamSelectorCtrl
-
teamSelector controler
Type:
- Object
- Source:
- api/ListTeams.js
Properties:
Name Type Description elementElement the select element
setOptionsfunction a function to reset the select
onselectfunction a function that takes a callback with the selected team
onreadyfunction a function that takes a callback with the list of teams