Hi, We would like to render our own map tiles for an iOS app in an offline mode. The main motivation for rendering our own map tiles is to have street labels in both local language and English. The app is now using map tiles from Cloudmade with street labels in local language by default. I have a few questions.
Thank you. asked 18 Mar '14, 13:19 jwt8070 |
Carto/Mapnik style sheets for use with OSM - whether in TileMill or a standalone rendering server as described on switch2osm.org - depend on a database from where they load their data from. In one of the style config files you'll find SQL SELECT queries for that. These can be modified to take other names into account, e.g. instead of
you would write (a very simplistic approach)
This would then put the English name in parentheses. More complex queries - that only insert parentheses where an English name is present, or where it is present and different from the local name, or somesuch - are just a matter of more SQL. For this to work, your database must of course have the Since SQL queries are used, you could trivially also retrieve a translation of the name from a different table by joining that into the query. Of course it would be even better if you just added the appropriate answered 18 Mar '14, 14:43 Frederik Ramm ♦ |
As a quick and dirty solution to the "languages" part of the problem, I'd do the same as I suggested in a previous answer to a different question - use a lua script to combine the names any way that you want, and use the standard openstreetmap-carto stylesheet (modified with TileMill if you prefer) to render tiles. You can, of course use a different stylesheet, or create your own. Another thought might be not to restrict yourself to tiles. I'm aware of at least one iOS renderer project (OpenStreetPad), although it's not been updated for a while. answered 18 Mar '14, 13:35 SomeoneElse ♦ |
Forgetting about the technicalities for a second.
The language tags are for non-local language names that are in use for the road, something which is rather rare (for roads). Please do not add "translations" of street names to OSM, in general they will simply be nonsense.