API MapView Widget Test Page
--- Select API Method ---
activateDrawGeometry
activateLayer
activateTour
filterLayerWms
loadFeatures
search
zoomToExtent
activateDrawGeometry
activateLayer
activateTour
filterLayerWms
loadFeatures
search
zoomToExtent
Example:
let epsgOutput = 25832
let 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
}
mapsWidgetApi.activateDrawGeometry('Test','Polygon', epsgOutput, options);
Example:
mapsWidgetApi.activateLayer('GVCC_ADDRESS_WWW', true);
Example:
let filter = [
{
layerIdentifier: "GVCC_ADDRESS_WWW",
cql_filter: "ISTAT IN (21098, 21024)"
}
];
mapsWidgetApi.filterLayerWms(filter);
Example:
let geom = {
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[666592.197669468, 5170710.49251019],
[666505.044508126, 5170703.92640931],
[666521.46034331, 5170613.79175172],
[666505.044508126, 5170613.79175172],
[666502.05981082, 5170549.02612027],
[666623.238521452, 5170534.70008198],
[666631.59567391, 5170640.65307352],
[666573.692546169, 5170631.69929959],
[666550.11343745, 5170644.53304222],
[666592.197669468, 5170710.49251019]
]
]
}
}
],
epsg: 28532
};
mapsWidgetApi.loadFeatures(geom);
Example:
mapview.civis.bz.it/maps/api/v1/search/100841/features
?q=11+tramin+a¢er=46.666843127186475,11.176197773693417
let sparam={
"searchText": "11 tramin a",
center : {
"lat": 46.666843127186475,
"lon": 11.176197773693417
},
searchType: {
"id": 100841
}
}
mapsWidgetApi.search(true,sparam);
Example:
mapsWidgetApi.zoomToExtent([670296.7213002031, 5132820.470288024, 671171.7230502067, 5133340.686172207]);