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

Should untitled layers be exposed in the layer list UI? #319

Open
Malvoz opened this issue Feb 25, 2021 · 4 comments · May be fixed by #993
Open

Should untitled layers be exposed in the layer list UI? #319

Malvoz opened this issue Feb 25, 2021 · 4 comments · May be fixed by #993
Assignees
Milestone

Comments

@Malvoz
Copy link
Member

Malvoz commented Feb 25, 2021

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
Copy link
Member Author

Malvoz commented Feb 25, 2021

FWIW given the following HTML:

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

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

empty-option

@prushforth
Copy link
Member

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.

@AliyanH
Copy link
Member

AliyanH commented Feb 1, 2023

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" } } ] }

@yhy0217 yhy0217 added this to the Autumn 2023 milestone Nov 8, 2023
@AliyanH
Copy link
Member

AliyanH commented Oct 2, 2024

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

@yushan-mu yushan-mu linked a pull request Oct 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants