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

Add <meta> element values found only in MapML, especially zoom, extent and projection #7

Open
prushforth opened this issue Jun 2, 2016 · 6 comments

Comments

@prushforth
Copy link
Member

This need was created by the inline features concept

@prushforth
Copy link
Member Author

Need to agree/fix whether the meta name=tcrs or meta name=projection

@Malvoz
Copy link
Member

Malvoz commented Sep 26, 2019

whatwg/html#2335 suggests that new <meta> features should be defined as new attributes, rather than new values for the name attribute.

E.g.

<meta zoom="">

instead of:

<meta name="zoom" content="">

@prushforth
Copy link
Member Author

OK, sounds good, thanks for finding that reference. My experience with these meta values is that they can become a second, or third source of truth, and the UA will need some rules on priority. But let's put that aspect on hold for when we determine exactly which meta variables we will need. zoom seems to be an obvious one.

@prushforth
Copy link
Member Author

Related issue

@prushforth
Copy link
Member Author

We've implemented the <meta name="extent" content="zoom=0,top-left-row=4,top-left-column=3,bottom-right-row=5,bottom-right-column=4" /> element, where the author can specify an extent for the document content that provides a default value for the document.

Individual content elements may not conform to this extent; for example a <link rel="tile" tref="..."> might have associated <input type=location> elements that don't specify min/max attributes and thus tile can't be constrained according to those values; the <meta name="extent"...> associated to the document then provides a "default" extent for the document that may be more suitable to the server's content than defaulting to the extent of the entire TCRS extent.

This comment is the documentation of the syntax of the implementation, until the spec can be updated. Please correct / comment if I get something incorrect or incomplete.

The element requires a content attribute that specifies a bounding extent of document content. The content attribute contains comma-separated name=value pairs. The set of name=value pairs must specify a bounding extent using coordinates of the top-left-axisName and bottom-right-axisName corners of the extent. The values of these coordinates must be specified by axis name. If the axis name is insufficient to determine the coordinate system's zoom level, a zoom=value key/value pair must also be specified. For example:

<meta name="extent" content="zoom=0,top-left-row=4,top-left-column=3,bottom-right-row=5,bottom-right-column=4" />

An extent is characterized by 4 coordinates ( two coordinate pairs). In the above example, the coordinate pairs are: (3,4),(4,5).

In the case where the coordinate system is scale-independent, for example pcrs or gcrs, the extent may omit the zoom=value parameter:

<meta name="extent" content="top-left-northing=9845941,top-left-easting=-4386083,bottom-right-northing=-9796765,bottom-right-easting=4783070" />

or

<meta name="extent" content="top-left-latitude=90, top-left-longitude=-180, bottom-right-latitude=-90,bottom-right-longitude=180" />

Note that the coordinate system (gcrs,pcrs,tcrs,tilematrix) of the extent is inferred from the first axis name encountered. If axes from more than one coordinate system are encountered, the extent will be ignored.

@prushforth
Copy link
Member Author

The implementation of this is not perfect, because we rely on Leaflet for rendering at this stage. In doing so, we represent extents using L.Polygon, which in turn relies on L.LatLng. So, extents that "fall off the edge of the earth" do not work well, despite that they are defined in tiles, or easting/northing etc. We will need to implement an extent renderer, which doesn't rely on transforming points to latlng for display.

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

No branches or pull requests

2 participants