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

Implement map content selection based on media queries associated to map-link #901

Closed
prushforth opened this issue Nov 8, 2023 · 4 comments · Fixed by #1021
Closed

Implement map content selection based on media queries associated to map-link #901

prushforth opened this issue Nov 8, 2023 · 4 comments · Fixed by #1021
Labels
epic Large user story which could give rise to many issues in its fulfillment user preferences Allow user to set a remembered value across domains web platform compatibility
Milestone

Comments

@prushforth
Copy link
Member

Implement ideas in Maps4HTML/HTML-Map-Element-UseCases-Requirements#43 and #546 and Maps4HTML/HTML-Map-Element-UseCases-Requirements#256
Would likely replace announcing of location: per #552

@prushforth prushforth added this to the Autumn 2023 milestone Nov 8, 2023
@prushforth
Copy link
Member Author

prushforth commented Nov 28, 2023

One relevant specification for this feature is Media Queries Level 5, which specifies a set of prefers- user preference related query features, although there seems to be some doubt as to their fitness for the Web.

None of the other media features seems to fit with the core requirement here, and media types seem to be deprecated.

I propose to prototype a prefers-map-content or similar construct, with a set of values that we should discuss below.

Inital thoughts on domain of values for prefers-map-content

  • image - user prefers that the map content be retrieved / painted using the WMS model
  • tiled-image - paint the map using image tiles
  • feature - represent layers as vector data if possible. This could be used to improve a11y for image-based maps
  • vector-tile - represent map content with vector tiles, if possible.
  • table - present data as a table of features, sorted ascending by distance from map location
  • no-preference - prefers to retrieve no remote content for maps

@prushforth prushforth mentioned this issue Nov 28, 2023
2 tasks
@prushforth
Copy link
Member Author

prushforth commented Dec 10, 2023

Other potentially useful media features and possible values and types
map-projection: OSMTILE, CBMTILE, WGS84, custom, discrete
map-zoom: <integer>, range type
map-scale: <integer>, range type

@prushforth
Copy link
Member Author

@prushforth prushforth added web platform compatibility epic Large user story which could give rise to many issues in its fulfillment user preferences Allow user to set a remembered value across domains labels Aug 20, 2024
@prushforth
Copy link
Member Author

I was really hoping to shoe-horn bbox media queries through this facility, but this is out of bounds as far as the CSS grammar / parser goes, at least for now. The reason is that media feature values (<mf-value> in the linked spec) cannot contain commas, and representing individual corner coordinates of the bounds / map extent as independent media features would not work as far as how media query solving works (each predicate is individually assessed as true/false/unknown, without having the complete state required to fully evaluate bbox overlaps).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Large user story which could give rise to many issues in its fulfillment user preferences Allow user to set a remembered value across domains web platform compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant