-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Serve styles #1607
Comments
This part is a bit unclear, what do you mean by this specifically? And yes, adding styles would defintively be required to implement this feature: |
The following sections could be added automatically: mapbox_style.json: ...
"glyphs": ".../fonts/{fontstack}/{range}.pbf",
"sprite": ".../sprites",
...
"sources": [
"source_name": {
"type": "vector",
"url": "/tiles/.../tiles.json"
},
] |
I don't think that this would work as you intended. We would need to
In particular because of the last issue, we would need to do the wrong kind of magic. I.e. the kind which does unintended things easily and is hard to debug our users). |
This feature could be optional. Styles are typically served as static files, but they may also support templating, such as: ...
"glyphs": "{{ .Fonts }}",
"sprite": "{{ .SdfSprites.base }}",
...
"sources": [
{{range .Sources}}
"{{.Name}}": {
"type": "vector",
"url": "{{.TileJson}}"
},
{{end}}
] |
Lets track the work needed to resolve this issue in #518 instead. |
I think we may need to focus on this issue rather than the more generic (and possibly less needed?) #518. Use cases
Config structurestyles:
paths:
# scan this whole dir, matching all *.json files
# Each found file name is published as a style with the same name
- /dir-path
# specific json file will be published as a style, using its name
- /path/to/osmbright.json
sources:
# named styles match style name to a single file
my-osm-bright: /path/to/my-osm-bright.json CLISimilar to API
|
We could serve the json first and wait for the maplibre native binding released at same time. |
Is it possible to configure support for serving static files or Mapbox-style JSON files using a configuration file?
or
Additionally, when serving Mapbox-style JSON files specifically, could the system automatically add related fonts, sprites, and sources to the file?
The text was updated successfully, but these errors were encountered: