Maps4HTML / MapML-Specification

Map Markup Language is hypertext for Web maps, like HTML is hypertext for Web pages https://maps4html.org/MapML-Specification/spec/
Other
55 stars 12 forks source link

Is the `label` element useful? #204

Open Malvoz opened 3 years ago

Malvoz commented 3 years ago

The MapML input and select elements (which are labelable elements in HTML) are - to my understanding - only used to capture/respond to input from gestures. I haven't found any examples <label> in MapML, is there a need to label these element?

prushforth commented 3 years ago

It bears thinking about; there are cases where the input and select are presented to the user in the layer control, and so should be labelled. OTOH location inputs are used (so far) only as proxies for the extremities of the map extent. They generate locations based on the corresponding location of the map window.

I could see them being used in future to directly provide an input control for feature geometries. In that case they would have to be labelable as well.

Malvoz commented 3 years ago

In https://maps4html.org/experiments/datacube/, the datacube/msi.mapml layer source contains various types of input and a select:

<extent units="CBMTILE">
  <input name="z" type="zoom" value="25" min="4" max="25" />
  <input name="xmin" type="location" rel="map" position="top-left" axis="easting" units="pcrs" min="-6105785.728719063" max="6174630.753072981" />
  <input name="ymin" type="location" rel="map" position="bottom-left" axis="northing" units="pcrs" min="-1692155.9568245453" max="4482681.2054050295" />
  <input name="xmax" type="location" rel="map" position="top-right" axis="easting" units="pcrs" min="-6105785.728719063" max="6174630.753072981" />
  <input name="ymax" type="location" rel="map" position="top-left" axis="northing" units="pcrs" min="-1692155.9568245453" max="4482681.2054050295" />
  <input name="w" type="width" min="0" max="10000" />
  <input name="h" type="height" min="0" max="10000" />
  <select id="tie" name="time">
    <option>2000-08-15T00:00:00Z</option>
    ...
  </select>
  <link
    tref="https://datacube.services.geo.ca/ows/msi?SERVICE=WMS&amp;REQUEST=GetMap&amp;FORMAT=image/png&amp;TRANSPARENT=TRUE&amp;STYLES=msi-color&amp;VERSION=1.3.0&amp;LAYERS=msi&amp;WIDTH={w}&amp;HEIGHT={h}&amp;CRS=EPSG:3978&amp;BBOX={xmin},{ymin},{xmax},{ymax}&amp;TIME={time}"
    rel="image"
  />
</extent>

where <select> is presented to the user (under the Time setting in the layer control - clarifying for others). Other input types such as width and height I don't think would make much sense to be present to users. So there seem to be some inconsistency there. Can/should these elements be styled/stylable from within the mapml file?

I think there are some concerns, and experts may require us to separate these elements from corresponding controls to be presented to users. Time will tell.