Maps4HTML / geoserver

Maps for HTML MapML Extension / plug-in development fork of GeoServer
https://docs.geoserver.org/latest/en/user/extensions/mapml/index.html
Other
3 stars 1 forks source link

Allow GeoServer user to specify that a layer group should be replicated in MapML URL templates #32

Open prushforth opened 3 years ago

prushforth commented 3 years ago

If you put two discontinuous GeoServer layers over the same continuous data source into a LayerGroup e.g. a satellite image of Canada is your data source and you set up two layers, one over Nova Scotia's extent and the other over the extent of British Columbia, which you then put into a LayerGroup that you call "BC & NS".

If the user makes a WMS request to the LayerGroup for a bbox that covers Canada, you will receive the full satellite image of Canada in response, not just the rectangles which bound BC and NS.

To escape this problem, MapML could serve this LayerGroup not as a single URL template that references the layer group, but as a pair of separate URL templates, each with its own location inputs, with those inputs' min/maxvalues scoped to the bounding rectangles of the layers in the group. The MapML mapml-viewer client will only make requests against a template within the extent assigned to that template by its inputs' min/maxvalues (example shows tilematrix extents, but could be pcrs just as well, or mixed fwiw):

<extent units="OSMTILE">
  <input name="zBC" type="zoom" value="6" min="0" max="15"/>
  <input name="yBC" type="location" units="tilematrix" axis="row" min="18" max="21"/>
  <input name="xBC" type="location" units="tilematrix" axis="column" min="7" max="11"/>
  <link rel="tile" tref="https://example.org/3857/BC/tile/{zBC}/{yBC}/{xBC}"/>

  <input name="zNS" type="zoom" value="6" min="0" max="15"/>
  <input name="yNS" type="location" units="tilematrix" axis="row" min="22" max="23"/>
  <input name="xNS" type="location" units="tilematrix" axis="column" min="20" max="21"/>
  <link rel="tile" tref="https://example.org/3857/NS/tile/{zNS}/{yNS}/{xNS}"/>
</extent>