Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GeoServer's minimum and maximum image generation width and height for serialized width and height inputs #46

Open
prushforth opened this issue Oct 21, 2022 · 0 comments
Labels

Comments

@prushforth
Copy link
Member

prushforth commented Oct 21, 2022

Background

When generating a <map-extent> for an image-based map, the current MapML extension serializes two <map-input>s which reflect the standard width and height WMS parameter values. Such inputs are serialized to support GetMap and GetFeatureInfo request templates, and (currently) have hard-coded min and max attribute values:

...
    <map-extent  units="OSMTILE">
      <map-input name="z" type="zoom"  min="0" max="18"/>
      <map-input name="xmin" type="location" rel="map" position="top-left" axis="easting" units="pcrs" min="1.6011619366020126E7" max="1.6528622369542673E7"/>
      <map-input name="ymin" type="location" rel="map" position="bottom-left" axis="northing" units="pcrs" min="-5411138.5986247435" max="-4804213.1199940005"/>
      <map-input name="xmax" type="location" rel="map" position="top-right" axis="easting" units="pcrs" min="1.6011619366020126E7" max="1.6528622369542673E7"/>
      <map-input name="ymax" type="location" rel="map" position="top-left" axis="northing" units="pcrs" min="-5411138.5986247435" max="-4804213.1199940005"/>
      <map-input name="w" type="width" min="1" max="10000"/>
      <map-input name="h" type="height" min="1" max="10000"/>
      <!-- If the layer is queryable per the GeoServer catalog, a query link template and associated variables should be serialized -->
      <map-link  rel="image" tref="http://example.org/geoserver/wms?request=GetMap&crs=EPSG:3857&service=WMS&bbox={xmin},{ymin},{xmax},{ymax}&layers=tasmania_state_boundaries&styles=green&format=image/png&width={w}&language=en&version=1.3.0&transparent=true&height={h}"/>
      <map-input name="i" type="location" axis="i" units="map"/>
      <map-input name="j" type="location" axis="j" units="map"/>
      <map-link rel="query" tref="http://example.org/geoserver/wms?request=GetFeatureInfo&query_layers=tasmania_state_boundaries&crs=EPSG:3857&bbox={xmin},{ymin},{xmax},{ymax}&language=en&version=1.3.0&transparent=true&service=WMS&layers=tasmania_state_boundaries&width={w}&x={i}&feature_count=50&y={j}&styles=green&info_format=text/mapml&height={h}"/>
    </map-extent>
...

Requirement

All width and height inputs should be serialized with the min and max attribute values in effect for the GeoServer system, if such limits indeed exist.

(Possible) Reference

<map-input type="height" name="h" min="16" max="2048"></map-input>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant