Web-Map-Custom-Element icon indicating copy to clipboard operation
Web-Map-Custom-Element copied to clipboard

Should untitled layers be exposed in the layer list UI?

Open Malvoz opened this issue 4 years ago • 4 comments

Modifying us_pop_density.mapml (used in e.g. keyboardInteraction.html) results in the following:

<title><!--US Population Density--></title>

empty-title

<!--<title>US Population Density</title>-->

no-title

Should untitled layers be visible in the layer list?

Malvoz avatar Feb 25 '21 14:02 Malvoz

FWIW given the following HTML:

<select>
  <option></option>
</select>

does result in an empty option (tested in Chrome and Firefox):

empty-option

Malvoz avatar Feb 25 '21 14:02 Malvoz

I think untitled/labelled layers should be presented, because you can hide layers you don't want shown by adding the hidden attribute. I do think they could have a generated "Map Layer" or some such, so that screen readers would say them. TBD how well this layer control works for screen readers.

prushforth avatar Mar 02 '21 21:03 prushforth

Currently, when GeoJSON layers (with no label) are pasted to the mapml-viewer, they get a default localized name of "Layer". I wonder if the same semantics should be used for untitled/unlabeled layers.

For ex. Pasting the following geojson to a mapml-viewer results in a new layer with the "Layer" label: { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {}, "geometry": { "coordinates": [ [ -75.70390559334825, 45.4080260348249 ], [ -75.68642173896234, 45.428944769710455 ] ], "type": "LineString" } } ] }

AliyanH avatar Feb 01 '23 17:02 AliyanH

To test this bug, add the following layer to the sandbox:

<layer- checked>
        <map-meta name="projection" content="OSMTILE"></map-meta><map-feature zoom="10">
        <map-featurecaption>Copied OSMTILE gcrs location</map-featurecaption>
        <map-properties>
            <h2>Copied OSMTILE gcrs location</h2>
            <div style="text-align:center">-75.866089 45.463020</div>
        </map-properties>
        <map-geometry cs="gcrs">
          <map-point>
            <map-coordinates>-75.866089 45.463020</map-coordinates>
          </map-point>
        </map-geometry>
      </map-feature>
</layer->

The layer shows up as undefined, it should instead be called Layer

AliyanH avatar Oct 02 '24 15:10 AliyanH