Giter Club home page Giter Club logo

Comments (13)

systemed avatar systemed commented on May 27, 2024

This is what I get when running tilemaker with the bundled demo server and version of OSM Bright:

Screenshot 2023-12-15 at 09 03 06

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.

StephenAtty avatar StephenAtty commented on May 27, 2024

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.

systemed avatar systemed commented on May 27, 2024

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.

StephenAtty avatar StephenAtty commented on May 27, 2024

its version 8

https://maps.tty.org.uk/bright_uk-style.json

from tilemaker.

systemed avatar systemed commented on May 27, 2024

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.

StephenAtty avatar StephenAtty commented on May 27, 2024

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.

systemed avatar systemed commented on May 27, 2024

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.

StephenAtty avatar StephenAtty commented on May 27, 2024

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.

systemed avatar systemed commented on May 27, 2024

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.

StephenAtty avatar StephenAtty commented on May 27, 2024

That looks like its fixed it.

from tilemaker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.