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

Expose a method for retrieving a stable map style.json url #438

Closed
1 task
achou11 opened this issue Jan 18, 2024 · 0 comments · Fixed by #457
Closed
1 task

Expose a method for retrieving a stable map style.json url #438

achou11 opened this issue Jan 18, 2024 · 0 comments · Fixed by #457
Assignees
Labels
mvp Requirement for MVP

Comments

@achou11
Copy link
Member

achou11 commented Jan 18, 2024

Description

Mapping libraries often require a url that points to a map style definition, which defines how a map is rendered. In our case, we want a frontend client to be able to get a stable URL that points to the backend, which will do the work of figuring out which resource to send back (see #439).

This makes it much simpler for frontend integration, as it doesn't have to implement any logic to figure out which specific style resource to point to and would roughly look like this:

  1. Retrieve the url e.g. const styleUrl = manager.getStyleJsonUrl()

  2. Set that url for the map e.g. new mapboxgl.Map({ container: 'map' style: styleUrl }) (plain JS) or <MapView styleUrl={styleUrl}>... (React)

Tasks

  • Implement a method on the MapeoManager for retrieving a stable style.json url.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mvp Requirement for MVP
Projects
None yet
2 participants