maputnik / osm-liberty Goto Github PK
View Code? Open in Web Editor NEWA free Mapbox GL basemap style for everyone
License: Other
A free Mapbox GL basemap style for everyone
License: Other
Hello,
I am using http://osm-liberty.lukasmartinelli.ch link in my code. The base tiles are not displaying properly. this is due to a mixed content warning by the browser as I am using http protocol on a https connection. Is the link available over https. Please let me know.
-Divya
from #110 (comment)
We don't use any of the _15 sprites!
The Readme seems to imply that I can
host the tiles and assets yourself for complete liberty.
But the tiles don't appear to be in the repo. Have I misunderstood the intent? I see that the tiles are being served from a free, non-commercial-use CDN, but what if I do want to serve them myself, say offline?
Currently, the style is used as a vector data source (https://api.maptiler.com/tiles/v3/), which uses a schema (https://docs.maptiler.com/schema/planet/) from MapTiler (based in OpenMapTiles); it would be better to use as a data source (https://api.maptiler.com/tiles/v3-openmaptiles/) which is based purely on the schema (https://docs.maptiler.com/schema/omt -planet/) from OpenMapTiles.
How are you creating the sprite sheets for the style once you have downloaded the individual svgs?
There are several style elements, like visibility: visible
that are unnecessary because those are the same as the defaults. It seems advantageous and not very difficult to write a short JS script to test PRs for these elements. (It could also be added to the pre-commit hook).
My thinking is to simply traverse the JSON and check each element of each style rule against that rule's default value. So the first step I suppose is to construct a list of the style defaults.
There's only a label displayed.
There are some layers with filters defined like:
"filter": [
"all"
],
They should be removed.
I'm using an openmatiles.com self-hosted server with default styles and additionally osm-liberty.
All styles work fine when creating offlinepacks with react-native-mapbox-gl apart from osm-liberty.
Is there anything that I need to configure or consider when trying to use this style offline?
It's working perfectly fine when connected, but it won't cache the last seen map view or work when downloaded as a pack.
In Ethiopia, most bigger buildings have names and serve as important landmarks for orientation.
Example: https://www.openstreetmap.org/way/25683380#map=18/8.99021/38.78952
Can we render such name tags?
Do they need to be included in OpenMapTiles first?
I noticed some disconnected streams (center of image), and discovered that it's because wetlands aren't currently given any styling.
https://maputnik.github.io/editor/#15.27/44.10019/-71.576018
This is defined as class=wetlands
within landcover
in the OpenMapTiles schema (And as natural=wetland
within OSM):
The default OSM basemap uses a custom pattern:
Should these polygons be given a style in OSM Liberty, and if so, what should it be?
There are some POIs without an icon, e.g.:
There are some new Maki icons, so it would be good to check if there are any new icons we could use for missing ones:
OpenMapTiles POI layer:
https://github.com/openmaptiles/openmaptiles/tree/master/layers/poi
Maki icons:
https://labs.mapbox.com/maki-icons/
Currently used iconset:
https://github.com/maputnik/osm-liberty/blob/gh-pages/iconset.json
SVGs for the used iconset:
https://github.com/maputnik/osm-liberty/tree/gh-pages/svgs/svgs_iconset
How to add new icons to the sprites used for the style:
https://github.com/maputnik/osm-liberty#icon-design
from #110 (comment)
Other OMT layers might have point features worthy of icons (aero things for instance)
Looks like the glyphs are missing.
https://orangemug.github.io/font-glyphs/glyphs/{fontstack}/{range}.pbf
See #119 for an example.
How to add Maki icons: https://github.com/maputnik/osm-liberty#icon-design
ref #113
I'm curious how you'd feel about hosting fonts in this repository. It might make it slightly easier for people to use the style.
Currently, glpyhs
points to
"glyphs": "https://api.maptiler.com/fonts/{fontstack}/{range}.pbf?key={key}"
which means someone can't use the style without adding a maptiler api key, or self hosting their own fonts.
As an example, in this repository I just store several fontstacks from openmaptiles/fonts releases in the git repository unzipped. That means I can just put glpyhs
as
"glyphs": "https://raw.githubusercontent.com/kylebarron/openmaptiles-fonts/master/fonts/{fontstack}/{range}.pbf",
and serve them directly from Github.
So similarly, you could add the Roboto fontstacks to this repository (optionally on a non-master branch), and then host them directly from this repo.
As a possible workaround to the JSON formatting issues mentioned in #66 and maplibre/maputnik#591, it might be easiest to just add gl-style-format
in place as a Git pre-commit hook. It should be as simple as adding an NPM package.json
with a couple dev dependencies, e.g. nst-guide@75b0657#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R24-R32
(for now, that only validates, not formats in place)
Before writing up a PR, just wanted to check if this is of interest.
Have a look at: http://osm-liberty.lukasmartinelli.ch/#12.7/54.5408/18.5292
Obłuże is rendered as "Obue".
Do there exist any examples showing how to use this style with Tileserver-GL?
I noticed that oneway
is an attribute on the transportation class of openmaptiles, but from a search of the repository it doesn't look like it's used. It might be nice to add a subtle arrow on one way roads
Because osm-liberty uses tilehosting.com for it's data sources for someone to use the style they first have to download the style and edit this line, replacing {key}
Line 19 in 5ad58ca
That seems like a awkward user experience to me, so I made https://github.com/orangemug/mapbox-gl-tokens which hopefully resolves that issue.
What does everybody think about adding https://github.com/orangemug/mapbox-gl-tokens to the README.md?
Has any thought been given to using the vector Natural Earth tiles? Currently osm-liberty only uses the natural_earth_shaded_relief
raster tiles.
Take a look at this example map:
http://naturalearthtiles.lukasmartinelli.ch/maps/natural_earth.vector.html
Here's the style.json
for that map. It looks like in that style.json
the vector data is overlaid on top of the raster, so a PR to OSM-liberty would be adding the vector layers to the existing raster.
The current raster layer only shows shading, and doesn't include boundaries or labels. Presumably when OSM data has been generated for the entire world, the OSM labels show through at low zooms, but when you're generating tiles through OpenMapTiles for a specific part of the globe, labels are otherwise missing:
Vector natural earth tiles are also available on Klokantech's repo: https://github.com/klokantech/naturalearthtiles/tree/gh-pages/tiles/natural_earth.vector
So if there was interest in adding this, I'd think we'd set Natural Earth vector to display at zooms 0-6(?) and then set most/all other OSM features/labels to only display from zoom 7 onwards
from #110 (comment)
OSM Liberty style uses icons very basically: it's just "icon-image": "{class}_11".
In the future the subclass could be used, yes. But how?
specify an icon for each subclass (or maybe for each class-subclass pair)
=> are there some features with an empty subclass? if so, do we need a fallback?
=> will we accept to duplicate lots of icons? or can we create aliases in sprite.json?
for each subclass (or class-subclass pair), create rules in the style that select an icon
...what are your thoughts?
We need to wait until Maputnik v1.6.0 is released (maplibre/maputnik#508).
Problem layers
Problem layers
It looks to me that the building*
layers should be above the bridge*
layers
Motivation:
To prevent confusion when using the style with Maputnik. Currently there is a 404/warning logged because there is no metadata file available for
https://orangemug.github.io/font-glyphs/glyphs/{fontstack}/{range}.pbf
:
To benefit from Maputnik's ability to show available fonts, e.g. this is how it looks with
http://fonts.openmaptiles.org/{fontstack}/{range}.pbf
, there is a metadata file available:
This might be helpful in a case like #30.
Some thoughts about possible options:
https://maps.tilehosting.com/fonts/{fontstack}/{range}.pbf?key={key}
. There is metadata available and we use Maptiler Cloud also as default for the tiles.//cc @orangemug
Visit the style page, open the javascript console, and:
maps['osm-liberty'].showTileBoundaries = true;
Once done you'll notice red lines delimiting the tile boundaries in the osm-liberty demo map, with the tile coordinates in the top left corner of each red box.
Then zoom the osm-liberty map beyond zoom level 6, and the tile boundaries disappear.
I found this out because I've copied this style to a map I'm working on as a proof-of-concept for the use of mapbox-gl for my company. I've noticed this problem is tied to the natural_earth layer in style.json. If I completely remove this layer definition and reload the page, setting showTileBoundaries = true
does absolutely nothing. If I remove the source declaration for natural_earth_shaded_relief
after removing the natural_earth
layer, everything works as expected.
I'll also file this bug on mapbox-gl's git and cross reference.
OSM Liberty currently renders place=neighbourhood
and place=suburb
, but not the intermediate place=quarter
(OSM wiki). I have opened an issue at OpenMapTiles (openmaptiles/openmaptiles#1064) to add place=quarter
there as well.
OSM Liberty only uses the words neighbourhood
and suburb
in one place in style.json
. Is it sufficient to add quarter
there or is more needed for rendering?
OSM Liberty is used by the OSM-based website knooppuntnet.nl and I would like to fix the lack of place=quarter
labels there (vmarc/knooppuntnet#136). Of course, as place=quarter
is an established tag with over 40,000 uses it should benefit all users of this style.
I was reading through the openmaptiles schema and saw that transportation_name
had a key named network
whose values say whether the motorway belongs to a standard network. (https://openmaptiles.org/schema/#transportation_name)
We could use those values to provide road shields that are more descriptive than a rectangle. This would encompass adding svgs to the sprite for each # of characters of ref
Here are US highway shields
https://commons.m.wikimedia.org/wiki/Category:Diagrams_of_U.S._Highway_shields
CA TransCanada: https://commons.m.wikimedia.org/wiki/File:TCH-blank.svg#mw-jump-to-license
I don't know whether the problem lies upstream in osm2vt.
Example: http://osm-liberty.lukasmartinelli.ch/#17.78/52.23858/20.99521
I think current rendering is quite confusing, see:
http://osm-liberty.lukasmartinelli.ch/#12.96/54.2656/18.0823
http://osm-liberty.lukasmartinelli.ch/#14.2/54.5175/18.5117
First, it's not obvious, as green is associated with vegetation, which may not be there. Secondly, whole settlements get filled. Last, as you can see from these two examples, forest and protected area doesn't stack well, in the first area light green is protected area, while in second light green indicates a forest.
Maybe just styling their outline would be more appropriate, like in osm-carto. Note there is no label, too.
The other problem is due to Mapbox Streets schema, in which for weird reasons national parks are conflated together with city parks, which doesn't make sense at all.
Also, the example areas are only landscape parks (differentiated by protect_class), which don't have permanent staff in them (no rangers or guides, though regular maintenance may take place). These areas often have however designated trails, educational/information boards, but allow for a modest level of human activity, so that entire villages may be enclosed by them.
@orangemug could you please update the repo description, maybe "A free Mapbox GL basemap style for everyone" (added the word "style") and remove or update the link. Because of the missing repo key a preview is working only via https://maputnik.github.io/editor/?style=https://rawgit.com/maputnik/osm-liberty/gh-pages/style.json, which may be too long here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.