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

Capabilities, Use Cases and Requirements which this responds to, and how well it does so. #32

Open
prushforth opened this issue Jun 14, 2019 · 10 comments

Comments

@prushforth
Copy link
Member

Capability: Add a layer to a map

You add a <layer> element as a DOM child of the <map> element.

@prushforth
Copy link
Member Author

Use Case: Allow a user to reset the map to their starting point

I have thought about adding a "Home" control to the map, but not got around to doing it. The home icon is often in the upper left hand corner of the map and it returns the map to the original location and zoom. But there could be other behaviours on top of that, such as resetting the DOM to it's original value i.e. removing layers that aren't in the page. If that was added, it wouldn't be different than refreshing the whole page, I believe.

Also to be considered, should there be a media fragment for map location? I've added fragment processing to this page, but what if there was more than one map on the page? What would the fragment do? Probably not much.

@prushforth
Copy link
Member Author

prushforth commented Jun 15, 2019

Use Case: Specify a data source for a map

In this proposal, you either set the <layer src="... url to mapml or other spatial format"> src attribute, or you include MapML and potentially HTML as content of the <layer> element and leave src off.

<map projection="CBMTILE" zoom="8" lat="45.6579383" lon="-74.9437391" controls>
  <layer label="Canada Base Map - Transportation (CBMT)" src="https://geogratis.gc.ca/mapml/en/cbmtile/cbmt/" checked></layer>
</map>

or

<map projection="CBMTILE" zoom="2" lat="61.209125" lon="-90.850837" controls>
  <layer label="Canada Base Map - Transportation (CBMT)" src="../../mapml/en/cbmtile/cbmt/" checked></layer>
<layer label="Territorial Evolution of Canada 1867 - Present" checked>
  <extent units="CBMTILE" method="GET">
    <input name="z" type="zoom" value="7" min="2" max="7">
    <input name="xmin" type="location" units="pcrs" position="top-left" axis="easting" min="-7786477.0" max="7148753.0">
  <input name="ymin" type="location" units="pcrs" position="bottom-left" axis="northing" min="-927808.0" max="7928344.0">
  <input name="xmax" type="location" units="pcrs" position="top-right" axis="easting" min="-7786477.0" max="7148753.0">
  <input name="ymax" type="location" units="pcrs" position="top-left" axis="northing" min="-927808.0" max="7928344.0">
  <input name="w" type="width">
  <input name="h" type="height">
  <select id="year-select" name="date">
    <option value="226,227,228,230,232,233,234">1867</option>
    <option value="216,217,218,220,222,223,224">1870</option>
    <option value="206,207,208,210,212,213,214">1871</option>
   <option value="1,2,4,6,7,8">2003</option>
  </select>
  <link rel="image" tref="https://geoappext.nrcan.gc.ca/arcgis/services/FGP/TE/MapServer/WMSServer?SERVICE=WMS&amp;VERSION=1.3.0&amp;CRS=EPSG:3978&amp;LAYERS={date}&amp;BBOX={xmin},{ymin},{xmax},{ymax}&amp;REQUEST=GetMap&amp;FORMAT=image/png&amp;TRANSPARENT=FALSE&amp;WIDTH={w}&amp;HEIGHT={h}&amp;STYLES=&amp;m4h=t"/>
   </extent>
  </layer>
</map>

@prushforth
Copy link
Member Author

Use Case: Change the bearing of a map

This is a good idea, but I haven't implemented it, mostly because it's not supported by Leaflet at this time.

Ideally, yes, this should be possible, and an attribute could be added to the <map> element to specify the initial bearing of the map. This capability would be really important, for example, for polar projections, to allow the MapML format to support one projection per pole, but allow the author to specify the map bearing.

@prushforth
Copy link
Member Author

prushforth commented Jun 15, 2019

Use Case: Allow the user to control the layer displayed by a map

I think that use case needs more description to identify what it means for the user to control the layer displayed by the map.

@prushforth
Copy link
Member Author

Use Case: Allow the user to select a different style for a map

There are different aspects to this, since a layer can be tiles, images, vectors, videos etc., or a combination thereof. We could talk in a separate issue perhaps about how to allow CSS to be applied to the styling problems of map features.

OTOH, this is about the user, so in that regard, MapML has got some proposals for that, as shown by this example (if it still works after 2019 tbd).

Anyway MapML allows the map author to specify alternate links to styles that are then user-selectable in our custom elements.

Lots more could be typed here, but I'll leave it at that until this arises for discussion

@prushforth
Copy link
Member Author

Use Case: Add a custom control to a map

Not yet supported, but strongly agree with the requirement for this. Leaflet has a pretty nice extension model for custom controls.

I was thinking that <layer static><!-- HTML that defines custom controls --></layer> could be one way to provide a generic facility that could be used for 'custom controls' and other needs. The idea behind the static boolean attribute would be that the layer wouldn't pan or zoom.

@prushforth
Copy link
Member Author

Use Case: Display multiple point locations on a single map

Add them via <layer>, either inline or as src MapML <feature> elements (don't have to be limited to points).

@prushforth
Copy link
Member Author

prushforth commented Jun 15, 2019

Use Case: Create, initialise, and display a map

Add a <map> with one or more child <layer> elements to the DOM, either before parsing (server side) or on the fly (via DOM JavaScript manipulation).

@Malvoz
Copy link
Member

Malvoz commented Jun 18, 2020

Use Case: Display drawings or schematics without geographic coordinates

I don't think the current content model of <map> satisfies the above use case;

Content model:
If lat, lon, and zoom are NOT present: Transparent; otherwise: Zero or more layer or area elements.

Non-geographic content doesn't have a need for (at least) lat and lon, so it doesn't make sense to require those attributes.

@prushforth
Copy link
Member Author

@Malvoz please see comment .

@prushforth prushforth transferred this issue from Maps4HTML/HTML-Map-Element Jul 22, 2020
@prushforth prushforth transferred this issue from Maps4HTML/MapML-Specification May 8, 2021
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