Members
-
<constant> fullscreen
-
A fullscreen Overlayer to display an image
- Source:
- dialog/fullscreen.js
Example
fullscreen.showImage(src, { title: 'my image' });
-
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 s
string string to translated
empty
boolean <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 media
Object options.callback
function a function that get the uploaded media
getError
boolean <optional>
false true to get the error if one
folders
Array.<string> - Source:
- dialog/openMedia.js
-
addMediaDialog(options)
-
Dialog to upload a new media
Parameters:
Name Type Description options
Object Properties
Name Type Argument Default Description callback
function a function that get the uploaded media
getError
boolean <optional>
false true to get the error if one
folders
Array.<string> - Source:
- dialog/openMedia.js
-
connectDialog(callback, error)
-
Connexion au services
Parameters:
Name Type Description callback
function a function called when connected
error
string error message
- Source:
- charte/macarte.js
-
embedCarte(options [, carte])
-
Share dialog
Parameters:
Name Type Argument Description options
Object Properties
Name Type Argument Default Description prompt
string <optional>
'Partager votre carte' Dialog title
carte
StoryMap | 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
-
getLayerSwitcher()
-
Return the layers switcher
- Source:
- control/layerSwitcher.js
-
getMediaFolderDialog(options, callback)
-
Get media folder dialog
Parameters:
Name Type Description options
Object Properties
Name Type Description folders
Array.<string> prompt
string callback
function a function that get the uploaded media
- Source:
- dialog/getMediasFolderDialog.js
-
getSimpleGeomType(type)
-
Get geometry type as Point/LineString/Polygon
Parameters:
Name Type Description type
string - Source:
- geom/getSimpleGeomType.js
-
helpData(content)
-
Handles data-help
Parameters:
Name Type Description content
element - Source:
- dialog/helpDialog.js
-
helpDialog(elt, md [, options] [, title] [, className])
-
Add an help dialog on an element
Parameters:
Name Type Argument Default Description elt
Element an I element to connect the help or an element to add a I element
md
string dialog content as markdown
options
Object <optional>
title
string <optional>
"aide..." className
string <optional>
large small large or medium
- Source:
- dialog/helpDialog.js
-
inputFolderList(folders, parent)
-
Create an input folder list
Parameters:
Name Type Description folders
Array.<string> parent
Element - Source:
- dialog/getMediasFolderDialog.js
Returns:
input element
- Type
- Element
-
openCarte(options)
-
Open dialog
Parameters:
Name Type Description options
Object Properties
Name Type Argument Default Description callback
function a function that get a carte to open
title
string <optional>
'Charger une carte' dialog title
filter
string <optional>
carte type 'macarte' or 'storymap', default all
type
string <optional>
carte type 'macarte' or 'storymap', default all
- Source:
- dialog/openCarte.js
-
openMedia(options)
-
Open media dialog
Parameters:
Name Type Description options
Object Properties
Name Type Argument Default Description callback
function a function that get a file to open
title
string <optional>
'Choisir un média' dialog title
thumb
boolean <optional>
false thumbnail default checkbox value
add
boolean <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 str
string - Source:
- config/removeDiacritics.js
Returns:
- Type
- string
-
render2Feature(feature)
-
Convert RenderFeature to feature
Parameters:
Name Type Description feature
RenderFeature - Source:
- ol/Feature.js
Returns:
- Type
- Feature
-
roundCoords(coords [, n])
-
Round coordinates
Parameters:
Name Type Argument Default Description coords
Coordinates n
number <optional>
1000 - Source:
- format/layer/roundCoords.js
Returns:
- Type
- Coordinates
-
saveCarte(carte, callback, options)
-
Save dialog
Parameters:
Name Type Description carte
Carte | StoryMap | AtlasDef the StoryMap or Carte or an atals object. The object is modified in place.
callback
function a callback function that takes the current carte and save optionsCarte
options
Object Properties
Name Type Argument Default Description prompt
string <optional>
'Enregistrer une carte' saveAs
boolean <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 elt
Element <optional>
if not defined will get all data-role="carousel" elements
- Source:
- charte/carousel.js
-
shareCarte(options)
-
Share dialog
Parameters:
Name Type Description options
Object Properties
Name Type Argument Default Description prompt
string <optional>
'Partager votre carte' Dialog title
carte
StoryMap | Carte | Object <optional>
the story or carte to share
target
Element <optional>
element to place in (default: a dialog)
- Source:
- dialog/shareCarte.js
-
showHelp(md [, options] [, title] [, className])
-
Show an help dialog
Parameters:
Name Type Argument Default Description md
string dialog content as markdown
options
Object <optional>
title
string <optional>
"aide..." className
string <optional>
large small large or medium
- Source:
- dialog/helpDialog.js
-
update()
-
Update reports layer
- Source:
- layer/ECReport.js
-
updateMediaDialog(options)
-
Dialog to modify a media
Parameters:
Name Type Description options
Object Properties
Name Type Argument Default Description callback
function a function that get the uploaded media
media
MCMedia true to get the error if one
title
string <optional>
dialog title
getError
boolean <optional>
false true to get the error if one
folders
Array.<string> a list of folders
- Source:
- dialog/openMedia.js
Type Definitions
-
AtlasDef
-
Atlas definition
Type:
- Object
- Source:
- StoryMap.js
Properties:
Name Type Description type
string Map type
title
string Map title in the atlas
description
string Map description in the atlas
updated_at
string Map update date
nb_view
number img_url
string Map image url
user
string theme
string Map theme
theme_id
number Map theme ID
share
string map share 'atlas'
premium
string valid
boolean active
boolean title_url
string title as set in url
view_id
string view ID
view_url
string url to view the carte
edit_id
string edition id (if can edit)
edit_url
string url for edition (if can edit)
-
statisticParam
-
Parameters for statistic calculation
Type:
- Object
- Source:
- layer/statistic.jsdoc
Properties:
Name Type Argument Default Description typeMap
string <optional>
choroplethe choroplethe,categorie,symbol,sectoriel,heatmap
cols
Array.<string> list of columns to use
mode
string <optional>
q class mode c(=custom), q(=quantile), k(=k-means), l(=logarithmic) or e(=equidistant)
nbClass
number <optional>
5 number of classes
symbol
string <optional>
'' symbol name to use in as symbol point
rmin
number <optional>
3 min radius (symbol/sectoriel), if < 0 mean proportional radius
rmax
number <optional>
20 max radius (symbol/sectoriel)
stroke
ol/colorLike <optional>
true has stroke
limits
Array.<number> <optional>
Statistics classes limit values
alpha
number <optional>
1 alpha (for points)
chartType
string <optional>
pie pie,pie3D, donut or bar
hradius
number <optional>
5 heatmap radius
hblur
number <optional>
15 heatmap blur
brewerColors
Array.<string> <optional>
list of brewer colors