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: Control which layers are currently visible & which can be hidden by the user #82

Open
NickFitz opened this issue Jun 14, 2019 · 7 comments
Labels
discussion: use case a possible use case: should it be included? what should it say? status: editor's draft there's a draft section in the report that corresponds to this discussion

Comments

@NickFitz
Copy link
Contributor

NickFitz commented Jun 14, 2019

This issue is for discussion of the use case “Control which layers are currently visible & which can be hidden by the user”, its examples & list of required capabilities.

@NickFitz NickFitz added discussion: use case a possible use case: should it be included? what should it say? status: placeholder there's a matching section heading / some text in the report, but it's far from complete section: client-side API Capabilities & use cases for client-side APIs labels Jun 14, 2019
@prushforth
Copy link
Member

This needs to be explained a bit more.

@NickFitz
Copy link
Contributor Author

This needs to be rethought, as the concept of a "layer" has various meanings within the different reference APIs, and even within the same API. For example, a layer in the sense of a representation of an area using tiles, or a layer in the sense of a collection of markers to be displayed above such a layer.

My original notion was related to the National Library of Scotland's site for viewing old Ordnance Survey maps overlaid on a modern map, so that one can for example select OS maps from the late 19th century, or the mid-20th century, overlaid on an OSM map.

This also relates to the idea of choosing the style of a map in Issue #81 as that idea, originally thought of in the context of, for example, a user with impaired vision using a high-contrast map, really amounts to selecting a mapping layer.

@prushforth
Copy link
Member

National Library of Scotland's site for viewing old Ordnance Survey maps overlaid on a modern map

I used this tool to great effect when I went on holiday to Scotland to visit the ancestral homeland. The farm that my Dad grew up on outside Edinburgh is now cut by a super highway and has been turned into a Rotweiler breeding kennel, but it was findable on the historical maps. What a great tool!

the concept of a "layer" has various meanings within the different reference APIs, and even within the same API. For example, a layer in the sense of a representation of an area using tiles, or a layer in the sense of a collection of markers to be displayed above such a layer.

Anyway, yes the concept of layer has to be quite a flexible abstraction, which is pretty much why I created MapML so as to fit a bunch of stuff into it without requiring APIs other than the uniform interface.

@cmhodgson
Copy link

In my quick perusal of the "Use Cases and Requirements for Standardizing Web Maps" doc, it seems to be lacking in the definition department. To me, there should be a section near the beginning that defines terms like Map, layer, feature, image, tile, etc. so that they are clear when we use them. To me, a Map layer is a logical collection of map features or map images/tiles which are grouped together for the purposes of combined control over styling and/or display. Typically there is one "background" layer, and zero to many overlay layers. Overlay layers are either images/tiles with transparent areas to allow the background to show through, or vector feature layers that are rendered on the client.

With vector layers, the styling is separate from the data, so switching styles or color themes (eg. dark vs light) is clearly separate from switching data layers. However, with raster based layers, some systems would allow you to change the style of a layer (WMS uses &style=) but only if so configured; more commonly, the different styles are implemented as different layers. For example, changing from dark to light street maps is done using the same parameter as changing from street maps to satellite view in every mapping system I'm familiar with, Google, Bing, MapBox, etc. So I think we need to talk separately about "styleable layers" and "non-styleable layers" in some cases.

Perhaps we have some definitions in another doc? I think these terms need to be clearly defined, we can't write a meaningful spec without well defined semantics.

@AmeliaBR
Copy link
Member

@cmhodgson Yes, I definitely agree that we need to define our terms. I've got an issue (#31) for that, but need to follow up with that.

@AmeliaBR
Copy link
Member

For client-side styling of vector layers, let's keep that separate, and focus on swapping tile sources.

For this use case, there are a few ways to look at it:

  • On the widget/declarative level, can the author specify a set of alternatives for a map layer, and let the user swap between them? E.g., to swap between street map and satellite imagery as the base tile layer.

  • On an API level, I'm not sure whether this needs to be a separate use case. If the website author is creating a custom widget to select the options, this really becomes comes down to being able to dynamically set a layer.

  • However, if there is a built-in style switcher, then at the API level the script might need to respond to a switch, e.g., to change the styles of the vector layers.

@AmeliaBR
Copy link
Member

We now have a few related use cases:

@AmeliaBR AmeliaBR added status: editor's draft there's a draft section in the report that corresponds to this discussion and removed status: placeholder there's a matching section heading / some text in the report, but it's far from complete labels Aug 10, 2019
@Malvoz Malvoz changed the title Use Case: Allow the user to control the layer displayed by a map Use Case: Control which layers are currently visible & which can be hidden by the user Mar 25, 2021
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: editor's draft there's a draft section in the report that corresponds to this discussion
Projects
None yet
Development

No branches or pull requests

4 participants