Componente di mappa
Events
| Name | Payload Type | Description |
|---|---|---|
mounted |
Raised when components has been mounted | |
map_loaded |
Raised when map has finished to load all its components (controls and layers) | |
drawn_geometry |
Raised when geometry has been drawn from "activateDrawgeometry" control (see related API) | |
drawn_geometry_clear |
Raised when drawn geometries drawn by "activateDrawgeometry" have been removed | |
finish_tour |
Raised when the presentation tour was over | |
identify_result |
Raised when identifying features of selected themes are passed to the component | |
new_notification |
Raised when a new notification is detected/added | |
change_lang |
Raised when the application language changes | |
search_result |
Raised when a result is selected from the list using the search tool |
Members
(static) props
Props passed to widget
-
current_user_iam
User logged in IAMcurrent_user User logged in application
-
context_path
The path to be pre-appended to the URL paths used in the requests.Ex.
basiccore -
base_url
The API URL of "maps" to be used when the widget is loaded within an application with a domain different from that of maps.Ex.
https:/deve-mapsview.civis.bz.it -
context_identifier
Identifier of the context to load. It is possible to provide the identifier instead of the entire context configuration.
The widget will make the appropriate request to the server to obtain the correct configuration.
It is not necessary to pass the "context_configs" parameter to the widget. -
context_configs
Context configurations to run widget. For details of this configurations see response of maps API:/maps/api/v1/contexts/<context_identifier> -
language
Language to localized widgetEx.
it -
initial_extent
Initial extent of the map[<minX>, <minY, <maxX>, <maxY>] -
initial_extent_epsg
Coordinate system of initial extentEx.
EPSG:25832 -
filtered_layers
Layers of the context to load that can not be visualizedEx.
{ contexts: ['BC-BASIC-CORE'], identifiers: ['PROV-ADMINISTRATIVE-UNITS-MUNICIPALITIES'], } -
cmp_configs
Tools and widgets configurations
This JSON configuration defines the component settings (cmpConfigs) for a mapping or GIS web application. It specifies which features, tools, and behaviors should be enabled or customized in different parts of the application, such as overview maps, catalogs, tools, and layer controls (TOC – Table of Contents). Here's a breakdown of its structure and functionality:
Top-Level Keys in cmpConfigs:
1. overview
-
Purpose: Sets the base layer for the overview map (typically a mini-map or context map).
-
Key:
layerIdentifier: Uses layer as the background layer.
2. catalogs
-
Purpose: Manages the visibility and availability of layer and data catalogs displayed on the left side of the widget interface.
-
Keys:
enabled: Activates catalogs in the desktop version of the applicationmobile: Specifies which catalogs are available when the application is used on mobile devices.
3. tools
-
Purpose: Defines which map tools are available to the user.
-
Keys:
-
enabled: List of desktop tools like:drawMeasure: Drawing and measuring on the mapselection: Spatial or attribute-based selectionidentifyMap: Identify features on the mapprintMap: Print the current map viewdownloadMap: Download the map as an image or filedownloadLayer: Download geodataeditingMap: Edit spatial featuresgeoprocess: Run geospatial processing functionstimeseriesTool: Time slider for temporal dataexternalThemes: Add external WMS Themes
-
default: Index in the enabled list marks the default active -
mobile: specifies which map tool are available when the application is used on mobile devices.
-
4. functions
-
Purpose: Activates additional application-wide features accessible through various submenus within the application.
-
Keys:
-
enabled: List of desktop tools like:fnBaseMaps: Switch between base mapsfnViewTools: Toggle map view toolsfnMasterDetails: Use master-detail UI layoutfnDocumentsRead,fnDocumentsWrite: Document management (read/write)fnExportData: Exporting datafnImportData: Importing datafnScalebar: Show scale barfnSearch: Search capabilitiesfnLocation: Geolocation toolsfnGoogleStreetView: Integration with Google Street Viewfn3dView: 3D map viewingfnViewTools: 2D map viewing tools
-
5. toc (Table of Contents)
-
Purpose: Manages available tools for each layer in the layer list panel.
-
Keys:
-
tools.enabled: For desktop, includes:infoLayer: View metadata or descriptionlayerLegend: Show legendfilterLayer: Filter data within layerlayerTransparency: Adjust layer opacityremoveLayer: Remove the layershortInfo: Show short information tooltipdownloadLayer: Download layer datazoomToExtent: Download layer data
-
tools.mobile: specifies which map tool are available when the application is used on mobile devices.
Ex.
cmpConfigs: { overview: { layerIdentifier: "PROV-BASEMAP-STANDARD", }, catalogs: { enabled: ['contextCatalog','geoCatalog'], mobile: ['contextCatalog'] }, tools: { enabled: ['drawMeasure','selection','identifyMap','printMap','downloadMap','downloadLayer','editingMap','geoprocess','timeseriesTool'], default: 2, mobile: ['identifyMap'] }, functions: { enabled: ['fnBaseMaps','fnViewTools','fnMasterDetails','fnDocumentsRead','fnDocumentsWrite','fnExportData','fnImportData','fnScalebar','fnSearch','fnLocation','fnGoogleStreetView','fn3dView'] }, toc: { tools: { enabled: ['infoLayer','layerLegend','filterLayer','layerTransparency','removeLayer','shortInfo', 'downloadLayer'], mobile: ['layerLegend','layerTransparency','removeLayer', 'shortInfo'] } } } -
-
territory
Territory parameter: This parameter consists of two values separated by a colon (:).- Territory name
- Territory id (code)
Ex.
MUNICIPALITY:21001 -
maps_api_env
Env code of maps api envinment to use.DEV - TEST - DEMO - PROD -
panel_tools_catalogs_visible
Boolean parameter to show or hide the buttons of tools and themes panel.Ex.
true -
panel_active_themes_visible
Boolean parameter to show or not the right panel that shows active themes.Ex.
true -
ctrl_zoom
Boolean parameter to enable the Zoom In/Out function on the map with ctrl + scroll.Ex.
true -
disable_identify_display
Boolean parameter to disable the display of identifying information in the template elements
of some components (e.g.,Map.vue,IdentifyTool.vue) for the selected layers.Ex.
true -
enable_search_event
Boolean parameter to enable the event generated by selecting an item from the search results. If not defined, event is disabled by default.Ex.
true
- Source:
Methods
activateDrawGeometry(Identifier, type, epsgOutput, options)
API - Enable control to draw geometry in map
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
Identifier |
String
|
of draw geometry control that will be initialized. User can interact later with same control passing the same identifier |
type |
'Point'
|
'LineString'
|
'Polygon'
|
Geometry type to draw |
epsgOutput |
String
|
Coordinate system of drawn geometry returned by map control (Only identifier code) |
options |
JSON
|
Extra params to handle draw control |
Example
epsgOutput = 25832
options = {
// Geometry format of drawn geometry: geojson, wkt..
outputFormat: "WKT",
// If clean previus drawn geometries when user starts to draw new one
cleanOnStart: true,
// If drawn geometries have to be removed after deactivating draw control.
cleanOnDeactivate: true
}
activateLayer(layerIdentifier, active, visible)
API - Turn on / off a layer in map.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
layerIdentifier |
String
|
Identificativo del layer |
active |
Boolean
|
Stato del layer: acceso / spento |
visible |
Boolean
|
(opzionale) se il layer è acceso, indica se deve essere visibile o no |
activateTour(parentSteps)
API - Activates tour widget. The widget displays a wizard at startup to describe the base functionalities of maps-widget
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
parentSteps |
JSON
|
List of parent application elements to insert into tour widget. |
Example
parentSteps = [
...
{
// Identifier class of parent element
target: '.tour-target-1',
// Relative position of popup
position: 'bottom-right',
// Content of popup: title and text
content: {
title: 'TOUR.steps.parent.1.title', //
text: 'TOUR.steps.parent.1.text'
},
},
...
]
WARNING: "text" and "title" parameters are the localization tag of text to display.
They have to be added in localization file of maps-widget
filterLayerWms(filter)
API - Filter WMS layer
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
filter |
JSON
|
list of cql filters to apply for specific layers |
Example
filter = [
{
layerIdentifier: BC-SESSIONS,
cql_filter: <cql_filter_string>,
columns: [<column1>, <column2>, ...]>
}
]
loadFeatures(jsonFeatures)
API - Load a list of vector features into map
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
jsonFeatures |
JSON
|
Json object with list of features in geojson format and their EPSG |
Example
{
features: [
<geojsonFeature>,
<geojsonfeature>,
...
...
]
epsg: 28532
}
onCompleteBcEditing()
BC: emit event of completed editing by the user (From EditingBcTool)
- Source:
search(active, searchParams)
API - Allows to make a search on different levels and displays results on map. The search has been performed through the maps search API: 'maps/api/v1/search/<searchTypeId>/features'.
searchTypeId -> one of params of 'searchParams' object parameter.
For more details of how "searchParms" is defined see documentation of maps search API service.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
active |
Boolean
|
If tool has to activate or to be closed. |
searchParams |
JSON
|
Search parameters. |
toggleIdentify(active)
API - Turn on / off the identify tool.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
active |
Boolean
|
Identify tool state: on / off |
zoomToExtent(extent, epsg)
API - Zoom to extent
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
extent |
JSON
|
List of coordinates of extent |
epsg |
String
|
Coordinate system of extent |
Example
extent = [ <minX>, <minY>, <maxX>, <maxY> ]
epsg = 25832