Enable multi-layer GetMap, GetFeatureInfo to return text/mapml structured to request multi-layer vector tiles #72
Labels
documentation
Improvements or additions to documentation
enhancement
New feature or request
GetMap
GetTile
help wanted
Extra attention is needed
idea
Milestone
Currently with the GeoServer MapML extension, there is no possibility of generating a text/mapml response containing a single-extent, multi-layer request template i.e. a <map-link rel="features" tref="...GetMap&layers=layer1,layer2,layer3...">. For one thing, this is because each layer has its own "Use Features" setting that is not driven by a WMS parameter. What's more, it was unclear how to serialize layers in such a request that are not "vector-capable" such as image layers.
If the GeoServer MapML extension were modified to examine the request
mapmlusefeatures:true|false
token, it would be possible for a request for text/mapml to generate a single <map-extent> containing a <map-link rel="features" tref="...GetMap&layers=layer1,layer2,layer3&format_options=mapmlfeatures:true..."> (wherein thetref
attribute contains a WMS GetMap URL template containing themapmlfeatures:true
format_options
parameter token and also contains a multi-layerlayers=
parameter list value).This requirement is to establish the behaviour of the GeoServer MapML extension when it processes a multi-layer GetMap request when the
format_options
parameter tokenmapmlmultiextent
is set to false.MapML document types available from GeoServer form a conceptual tree structure, in which the nodes are document types and the edges are links, either complete URLs or templated via the MapML <map-link tref="..."> URL template. The root node in the tree is the HTML preview document, which contains a link to a GeoServer layer in text/mapml format. GeoServer's Layer and Layer Group settings pages affect the how the HTML preview document root node is configured and serialized. In particular, the "Use Tiles", "Use Features" and "Multiple Extent Elements" settings for the Layer and Layer Group editing pages will dictate the values
format_options=
parameter tokens that are serialized into the HTML preview in the GetMap URL in the<layer- src="..."></layer->
src URL.Inner node parameters
The middle, or internal node in the above diagram is the first level of text/mapml document available from GeoServer, linked to by the <layer- src="...request=GetMap..."> src URL in the root node, and its configuration, or state, is controled by three tokens for the
format_options
GeoServer 'vendor' parameter. The tokens' values control, and only apply to the internal node (middle tier from diagram above) state:(The default value, or the value if the token is omitted, is false)
Table describing different combinations of mapmlmultiextent, mapmlusefeatures, and mapmlusetiles
traditional WMS image client
rel=image
-> expand / de-nest layer groups in order
for each layer:
-> create a map-extent for layer
traditional WMS image client
rel=image
if no tile cache
-> use tile-shaped WMS GetMap for image format
-> rel=image
-> rel=query uses WMS GetFeatureInfo
else
-> use GetTile URL template rel=tile
-> rel=query WMTS GetFeatureInfo for text/mapml infoformat
-> expand / de-nest layer groups in order
for each layer:
if no tile cache
-> use tile-shaped WMS GetMap for image format
-> rel=image
-> rel=query uses WMS GetFeatureInfo
else
-> use GetTile URL template rel=tile
-> rel=query WMTS GetFeatureInfo for text/mapml infoformat
traditional WMS image client
URL template rel=features type=text/mapml
query link if queryable
-> expand / de-nest layer groups in order
for each layer:
-> create a map-extent for layer
if layer is raster
-> query link
-> traditional WMS image client
-> rel=image
else
-> rel=features type=text/mapml
-> no query link (features)
-> URL template contains mapmlfeatures:true
if no tile cache
-> use tile-shaped GetMap as URL template
-> rel=tile type=text/mapml
-> URL template contains mapmlfeatures:true
-> generate rel=query map-link over WMS GetFeatureInfo, infoformat=text/mapml
else
-> use GetTile for text/mapml
-> generate rel=query map-link over WMTS GetFeatureInfo, infoformat=text/mapml
-> expand / de-nest layer groups in order
for each layer:
-> create a map-extent for layer
if layer is raster
-> if no tile cache
-> -> use tile-shaped GetMap rel=tile, format=image/*
-> else
->-> use GetTile, WMTS GetFeatureInfo for image type
-> -> query link WMTS GetFeatureInfo if layer is queryable
else
-> if no tile cache
-> -> use tile-shaped GetMap rel=tile type=text/mapml
-> -> URL template contains mapmlfeatures:true
-> else
-> -> use GetTile, WMTS GetFeatureInfo for text/mapml
-> -> query link WMTS GetFeatureInfo if layer is queryable
mapmlmultiextent:false | true
mapmlmultiextent:false | true
- controls the number and state of <map-extent> elements generated in the document, depending on the layers referenced by thelayers=
WMS parameter. Iffalse
(the default), a singleton <map-extent> element will be serialized, and that map-extent will be populated with child <map-input> and associated <map-link rel="..."> elements that conform to themapmlusefeatures:false | true
andmapmlusetiles:false | true
values. In the following listing, the document was generated with neither parameter, so they default to false.Inner node created according to mapmlmultiextent:false, mapmlusefeatures:false, mapmlustiles:false parameter
In the following listing of a single layer (LayerGroup) request, the document was generated with the inner node parameters
mapmlusefeatures:false | true
andmapmlusetiles:false | true
values set totrue
. Note that the fact that the configuration uses the "GetTile" WMTS request implies that a tile cache with an appropriate GridSet has been set up by the administrator. Had no tile cache been previously configured, the generated <map-extent> would use "tile-shaped" GetMap request templates and associated <map-input>s.Inner node created according to mapmlmultiextent:false; mapmlusefeatures:true; mapmlusetiles:true, tile cache previously established
For a
format_options=mapmlmultiextent:true
value passed to the inner node generator, if thelayers
parameter is list-valued, that is, references more than a single layer in a comma-separated list OR thelayers
parameter names a single GeoServer LayerGroup, the resulting text/mapml inner node document will contain one <map-extent> element per layer in thelayers
list OR per layer in the LayerGroup, with the <map-extent>s serialized according to the values of themapmlusefeatures
andmapmlusetiles
format_options
values. In the following listing, both of those options' values have defaulted (tofalse
), so each generated <map-extent> is configured to be a "traditional" WMS GetMap / GetFeature client:Inner node created according to mapmlmultiextent:true, mapmlusefeatures:false, mapmlusetiles:false
Inner node created according to mapmlmultiextent:true; mapmlusefeatures:true, mapmlusetiles:false
Inner node created according to mapmlmultiextent:true; mapmlusefeatures:true; mapmlusetiles:true
Leaf node parameters
mapmlfeatures:false | true
The
mapmlfeatures
format_options
token value drives the creation of the leaf node document type. The middle tier node in the diagram will generate templated links embedded in <map-extent>s in the document. The <map-link tref> URL template to the leaf node text/mapml document will accordingly sometimes contain themapmlfeatures:true
token value, which will cause GeoServer to serialize the layer and layer group content as MapML feature and/or image tile data according to the individual layer's underlying data type.mapmlfeatures:false | true
An example leaf node document is:
The text was updated successfully, but these errors were encountered: