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 case: Geo-referencing HTML content #2

Open
prushforth opened this issue Oct 31, 2018 · 4 comments
Open

Use case: Geo-referencing HTML content #2

prushforth opened this issue Oct 31, 2018 · 4 comments
Labels
discussion: use case a possible use case: should it be included? what should it say? status: suggestion this issue discusses a suggested addition to the report, that is not yet in the draft

Comments

@prushforth
Copy link
Member

It should be possible to geo-reference HTML content at an appropriate scale without the need to display a map on the page, and following the principle of least power.

Let's say you wanted to describe a statue in a park, but you didn't want to include a visual map, just the location of the statue and a picture of it. You could encode the location of enclosed HTML content like so:

<map zoom=17 lat=45.397778 lon=-75.705278>
  <h2>The Man With Two Hats</h2>
  <img src="http://www.veterans.gc.ca/images/remembrance/memorials/national-inventory-canadian-memorials/mem/35059-173a.jpg" alt="Statue">
  <p>Unveiled on 11 May 2002, this monument pays tribute to the crucial role played by Canadian soldiers in the liberation of the Netherlands during the Second World War.</p>
  <p>The Ottawa Man with Two Hats monument is a replica of the statue found in the Dutch city of Apeldoorn named De man met de twee hoeden. The twin statues exemplify the strong ties between the Netherlands and Canada. The friendship that bonds the two countries grew during the Second World War, when Canadian soldiers played an important role in the Liberation of the Netherlands.</p>
  <p>The bronze monument, a gift to Canada from the Netherlands, was created by Dutch artist Henk Visch. The 4.6 meter structure was unveiled by Her Royal Highness Princess Margriet of the Netherlands in Ottawa in May 2002. The Princess had also dedicated the original Apeldoorn statue two years earlier in May 2000, during the 55th Anniversary of the Liberation of the Netherlands, in front of a large group of Canadian Veterans.</p>
</map>

The above content is highly geolocated, not only due to its coordinates, but also due to the zoom level. As such, the map bounds in the real world would give the map content an extent that could be indexed. The centre point of the map (@lat @lon) itself could be used as (point feature) in a visual/map-based 'summary' of the content. In this way, HTML documents can themselves be visualized on a map if necessary, for example as search results.

On the other hand, it should also be possible to geo-reference HTML/SVG as visible map content, by embedding that content in <layer> content, either inline or by URL reference. This latter idea is perhaps it's own (separate) use case.

@AmeliaBR AmeliaBR changed the title Geo-referencing HTML content Use case: Geo-referencing HTML content Apr 18, 2019
@AmeliaBR AmeliaBR added discussion: use case a possible use case: should it be included? what should it say? status: suggestion this issue discusses a suggested addition to the report, that is not yet in the draft labels Apr 18, 2019
@AmeliaBR
Copy link
Member

I'm not quite sure how to describe this use case. Is the idea to have metadata for HTML content that uses the same attributes or format as metadata for map features? Or are you expecting there to be some extra functionality triggered by the attributes?

HTML already has microdata syntaxes which can be used for metadata annotations, including latitude/longitude. But browsers don't really do much with it, currently.

@prushforth
Copy link
Member Author

The key idea is that a <map> will be a visual element, on top of which / inside of which, other elements are rendered, be they MapML, SVG or even HTML. Everything inside the rendering box of a <map> element should be rendered and managed like map content. That is, it should zoom and pan. Even though HTML elements, unlike SVG and MapML content, don't have explicit coordinates, they could still be treated like vector objects, because the rendering model inside a map frame would be map rendering (i.e. layered), pinned to a location, at a scale.

This is how I treat <area> elements in the polyfill: they are converted to <layer> elements containing MapML <feature> elements of an appropriate geometry. Same could be true of other HTML elements.

The Spatial Data on the Web Interest Group is very interested in microdata syntax for feature information, but I'm trying to think of it from another perspective, one where there is already explicit georeferencing available in HTML via <map> etc.

@AmeliaBR
Copy link
Member

I'm still not understanding. For your sample code, are you saying it should be a zoom & pan viewer for the image? And the lat/lon information would just be extra metadata?

Or are you saying that the image & text should be rendered as a pinpoint feature with a pop-up annotation?

@prushforth
Copy link
Member Author

prushforth commented May 16, 2019

OK, I apologize, I realized this is confusing anyway. For one thing, I forgot I had said this:

without the need to display a map on the page,

What I mean is that HTML/ other content inside a element could be considered to be geographic
features without needing explicit coordinates (like SVG has). The <map> itself is georeferenced, so its content is georeferenced. They could be rendered according to the pixel-based coordinate system with 0,0 at the upper left of the map rectangle, and fixed to those coordinates through zooms and pans.

For your sample code, are you saying it should be a zoom & pan viewer for the image?

Yes.

And the lat/lon information would just be extra metadata?

The lat /lon / zoom are how the map gets its initial location, and so it effectively determines what the lat/lon / zoom of the map content at startup is.

Or are you saying that the image & text should be rendered as a pinpoint feature with a pop-up annotation?

No, I am saying that the content could be drawn on the map as though it was graffiti for consumption by pilots. ;-). Although MapML content could represent pushpins with popups etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion: use case a possible use case: should it be included? what should it say? status: suggestion this issue discusses a suggested addition to the report, that is not yet in the draft
Projects
None yet
Development

No branches or pull requests

2 participants