You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developer-guide/map-query-parameters.md
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ The parameters can be passed in a query-string-like section, after the `#<path>?
13
13
Example:
14
14
15
15
```text
16
-
#/viewer/openlayers/new?center=0,0&zoom=5
16
+
#/viewer/new?center=0,0&zoom=5
17
17
```
18
18
19
19
!!! note
@@ -23,8 +23,8 @@ Example:
23
23
24
24
Sometimes the request parameters can be too big to be passed in the URL, for instance when dealing with an entire map, or complex data. To overcome this kind of situations, an adhoc `POST` service available at `<mapstore-base-path>/rest/config/setParams` allows to pass the parameters in the request payload `application/x-www-form-urlencoded`.
25
25
The parameters will be then passed to the client (using a temporary `queryParams-{random-UUID}` variable in `sessionStorage`).
26
-
Near the parameters, an additional `page` value can be passed together with the params to specify to which url be redirect. If no page attribute is specified by default redirection happens to `#/viewer/openlayers/config`.
27
-
The UUID used in the `queryParams-{random-UUID}` variable name is being added to the redirect URL in a query parameter named `queryParamsID=`. Assuming to use the default redirect value, the url will then look like the following: `#/viewer/openlayers/config?queryParamsID={random-UUID}`.
26
+
Near the parameters, an additional `page` value can be passed together with the params to specify to which url be redirect. If no page attribute is specified by default redirection happens to `#/viewer/config`.
27
+
The UUID used in the `queryParams-{random-UUID}` variable name is being added to the redirect URL in a query parameter named `queryParamsID=`. Assuming to use the default redirect value, the url will then look like the following: `#/viewer/config?queryParamsID={random-UUID}`.
28
28
29
29
Example `application/x-www-form-urlencoded` request payload (URL encoded):
30
30
@@ -39,7 +39,7 @@ Here a sample page you can create to test the service:
39
39
<script>
40
40
constPOST_PATH="rest/config/setParams";
41
41
constqueryParameters= {
42
-
"page":'../../#/viewer/openlayers/config',
42
+
"page":'../../#/viewer/config',
43
43
"map": {"version":2,"map":{"projection":"EPSG:900913","units":"m","center":{"x":1250000,"y":5370000,"crs":"EPSG:900913"},"zoom":5,"maxExtent":[-20037508.34,-20037508.34,20037508.34,20037508.34],"layers":[{"type":"osm","title":"Open Street Map","name":"mapnik","source":"osm","group":"background","visibility":true}]}},
44
44
"featureinfo":'',
45
45
"bbox":'',
@@ -121,7 +121,7 @@ Here a sample page you can create to test the service:
Where lon,lat values are comma-separated respecting order.
157
157
@@ -162,40 +162,40 @@ Allows to pass the entire map JSON definition (see the map configuration format
162
162
GET:
163
163
164
164
```text
165
-
#/viewer/openlayers/config?map={"version":2,"map":{"projection":"EPSG:900913","units":"m","center":{"x":1250000,"y":5370000,"crs":"EPSG:900913"},"zoom":5,"maxExtent":[-20037508.34,-20037508.34,20037508.34,20037508.34],"layers":[{"type":"osm","title":"Open Street Map","name":"mapnik","source":"osm","group":"background","visibility":true}]}}
165
+
#/viewer/config?map={"version":2,"map":{"projection":"EPSG:900913","units":"m","center":{"x":1250000,"y":5370000,"crs":"EPSG:900913"},"zoom":5,"maxExtent":[-20037508.34,-20037508.34,20037508.34,20037508.34],"layers":[{"type":"osm","title":"Open Street Map","name":"mapnik","source":"osm","group":"background","visibility":true}]}}
166
166
```
167
167
168
168
It also allows partial overriding of existing map configuration by passing only specific properties of the root object and/or the internal "map" object.
169
169
170
170
Following example will override "catalogServices" and "mapInfoConfiguration":
For more details check out the [zoomToExtent](https://mapstore.geosolutionsgroup.com/mapstore/docs/#actions.map.zoomToExtent) in the framework documentation.
Data of resulting layer can be additionally filtered by passing "CQL_FILTER" into the options array. Each element of array corresponds to the layer defined in action:
361
361
@@ -368,6 +368,6 @@ Data of resulting layer can be additionally filtered by passing "CQL_FILTER" int
368
368
}
369
369
```
370
370
371
-
GET `#/viewer/openlayers/config?actions=[{"type":"CATALOG:ADD_LAYERS_FROM_CATALOGS","layers":["layer1","layer2","workspace:externallayername"],"sources":["catalog1","catalog2",{"type":"WMS","url":"https://example.com/wms"}],"options": [{"params":{"CQL_FILTER":"NAME='value'"}}, {}, {"params":{"CQL_FILTER":"NAME='value2'"}}]}]`
371
+
GET `#/viewer/config?actions=[{"type":"CATALOG:ADD_LAYERS_FROM_CATALOGS","layers":["layer1","layer2","workspace:externallayername"],"sources":["catalog1","catalog2",{"type":"WMS","url":"https://example.com/wms"}],"options": [{"params":{"CQL_FILTER":"NAME='value'"}}, {}, {"params":{"CQL_FILTER":"NAME='value2'"}}]}]`
372
372
373
373
Number of objects passed to the options can be different to the number of layers, in this case options will be applied to the first X layers, where X is the length of options array.
Copy file name to clipboardExpand all lines: docs/developer-guide/mapstore-migration-guide.md
+1-20Lines changed: 1 addition & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ This is a list of things to check if you want to update from a previous version
27
27
The map configuration stores the information related to the visualization mode 2D or 3D after saving a map.
28
28
This update include also following changes:
29
29
30
-
-`maptype` configuration inside the initialState of localConfig needs to be removedin favor of the global mapTypeconfiguration
30
+
-`maptype`default state configuration inside the initialState of `localConfig.json` needs to be removed. If a MapStore project needs a particular setup (eg. use only OpenLayers for 2D maps, initialize the app in 3D, ...) it is possible to override the default map libraries configuration with the new `mapType` property in the `localConfig.json` file, see documentation [here](local-config.md#application-configuration).
31
31
32
32
```diff
33
33
{
@@ -49,25 +49,6 @@ This update include also following changes:
49
49
50
50
- the application does not expose the pathname of the viewer with `mapType` anymore. Example: the old path `/viewer/openlayers/1` becomes `/viewer/1`
51
51
52
-
- it is possible to change the map library based on the device using the new `mapType` configuration in localConfig.json. This configuration is only needed for project with custom map library settings. The downstream projects based on the MapStore product don't need this update
53
-
54
-
```diff
55
-
{
56
-
// ...
57
-
+ "mapType": {
58
-
+ "2D": {
59
-
+ "desktop": "openlayers",
60
-
+ "mobile": "leaflet"
61
-
+ },
62
-
+ "3D": {
63
-
+ "desktop": "cesium",
64
-
+ "mobile": "cesium"
65
-
+ }
66
-
+ },
67
-
// ...
68
-
}
69
-
```
70
-
71
52
- the app pages inside a MapStore project must be updated with a new entry, only for projects with custom pages and that are using context applications, here an example:
0 commit comments