Comments (13)
This is what I get when running tilemaker with the bundled demo server and version of OSM Bright:
Just guessing, but one possible cause is that the OpenMapTiles schema, exasperatingly, has no clarity about how names are meant to be encoded (openmaptiles/openmaptiles#930). I wonder if the version of the style you're using expects names to be in a different field from the one that tilemaker's processing script is writing. You can adjust this fairly easily in the first few lines of resources/process-openmaptiles.lua
.
If you want to compare what's in the tilemaker-created tiles vs your existing tiles, you could use the inspect plugin, or vt2geojson.
from tilemaker.
We're using bright. I'll see if I can get inspect plugin to work - it seems to be throwing an error at the moment.
I've tried setting the language to en rather than nil but it seems to have made no difference
from tilemaker.
I think the most likely change would be changing name:latin
to either name
or name_en
. If you can point at the exact version of the OSM Bright stylesheet you're using I can take a look.
from tilemaker.
its version 8
https://maps.tty.org.uk/bright_uk-style.json
from tilemaker.
Ah, I think I can see. It is the stupid OpenMapTiles name issue again.
Have a look at line 3603 in the style.json. The stylesheet contains the filter
[ "has", "name" ]
several times, i.e. "only show if the name attribute is set".
Which is fine, but it then goes on a few lines later to say
"text-field": "{name:latin}\n{name:nonlatin}",
i.e. "render a text label using the 'name:latin' attribute". So it looks for the name
attribute, but renders the name:latin
attribute. Sigh.
Easiest way to fix this would be to adjust tilemaker's Lua script (resources/process-openmaptiles.lua) so after this in line 687:
obj:Attribute(preferred_language_attribute, iname)
you add
obj:Attribute("name", iname)
then regenerate. That'll make sure it's set for both name:latin
(which is preferred_language_attribute
from the top of the file) and name
.
from tilemaker.
That's brought them back but places have different rank values.
So in my live maps
https://tiles2.tty.org.uk/index.html#16/51.906003/-2.04701
Clyde Crescent Play area has a rank of 21, in the new maps it is 25
Cheltenham Cemetery and Crem has a rank of 5, in the new maps it is 25
Bouncers Lane Cemetery has a rank of 2. It doesn't seem to be in the new maps.
Bus Stops just dont seem to be there at all
So I think this is down to the node_keys and the poiClasses and poiClassRanks
from tilemaker.
Yes, it isn't a like-for-like emulation of OpenMapTiles' rank values - OpenMapTiles has some fairly complex SQL operations to generate these, and they obviously aren't available to tilemaker as it isn't a SQL-based environment.
The Lua script has a GetPOIRank
function which you can tweak - as you've seen this uses poiClassRanks
as a lookup.
from tilemaker.
So how do I add things like bus stops. I assume I have to look at the existing map.So a bus stop is a class of "bus" and a subclass of "bus_stop"
Similarly for railway stations which seem to be class ='railway" and a subclass of "station"
from tilemaker.
Ah, sorry, you need to add the extra name code near L693 of the Lua as well. So it reads
if preferred_language and obj:Holds("name:"..preferred_language) then
iname = obj:Find("name:"..preferred_language)
obj:Attribute(preferred_language_attribute, iname)
obj:Attribute("name", iname) -- <=== insert this line
if iname~=name and default_language_attribute then
obj:Attribute(default_language_attribute, name)
else main_written = iname end
else
obj:Attribute(preferred_language_attribute, name)
obj:Attribute("name", name) -- <=== insert this line
end
I've highlighted the two lines to add. Just tested it and that works fine.
from tilemaker.
That looks like its fixed it.
from tilemaker.
Related Issues (20)
- Update Mac OS build instructions HOT 12
- Idea for more flexible access to relations HOT 2
- state boundaries have gaps HOT 6
- Could not find node with id HOT 2
- segmentation fault with large file ( > 4gb ) HOT 13
- Failed to solve process cmake HOT 2
- Generating MBTILE with info over 17z HOT 4
- Docker build broken HOT 1
- Weekly update world osm mbtiles HOT 2
- Unable to open landcover SHP HOT 6
- Vector tile generation faulty in edge cases ? HOT 4
- stylesheet HOT 1
- PR575 seems to break shapefile HOT 20
- Geometry clipping - summary issue HOT 2
- Low CPU usage when writing tiles HOT 1
- during writing, much time is spent in seemingly empty tiles HOT 3
- htt HOT 1
- Attribution
- 3.0 release planning HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tilemaker.