Skip to content
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

Multilingual option would be great #9

Open
geochetan opened this issue May 31, 2017 · 7 comments
Open

Multilingual option would be great #9

geochetan opened this issue May 31, 2017 · 7 comments

Comments

@geochetan
Copy link

Some inspiration from http://openstreetmap.in/demo/#3.9/20.72/81.76

@planemad
Copy link
Contributor

With minimal effort it will be possible to add a switcher for the languages that the Mapbox tiles already support: local + 9 languages https://www.mapbox.com/vector-tiles/mapbox-streets-v7/#overview

Code: https://www.mapbox.com/mapbox-gl-js/example/language-switch/

Switching the language to any arbitrary name:code OSM tag in the browser will be much harder and is an unsolved challenge

@planemad
Copy link
Contributor

The multilingual http://openstreetmap.in/demo required creating a custom tileset that included the multilingual name tags from OSM. This can work as a one time process, but it will be really hard to keep this tileset in sync with OSM as more translations are added.

A possible solution is to query overpass publicmap/publicmap.github.io#7 and dynamically create a geojson layer with objects with name:code that can be used to render the translations. This is practical at high zoom levels, but the query would fail at a country level scale.

cc @SrihariThalla

@DaxServer
Copy link
Member

@planemad Is it possible to add custom name_* fields for tiles in Mapbox Studio? If not, generating (and re-using OSM.in) tilesets is the only option for now. We could definitely start with reusing them!

Overpass is just not feasible as

  • The Map has to cache translated names as it doesn't want to query again if the zoom changes
  • The places are just too countless for an in-browser cache
  • We certainly don't want to block [DoS] Overpass servers with our requests if there are many concurrent users scrolling/ zooming/ panning through the map!

@chtnha How often do you guys generate the tilesets in the languages displayed on OSM.in site?


On a side note, is it just me or you observe it too?
screenshot 2017-06-01 10 45 45

The names are to be rendered as "భారతదేశం", "హైదరాబాద్", ...

@DaxServer
Copy link
Member

Another inspirational work by @srikanthlogic - Tamil Map - https://srikanthlogic.github.io/osm-ta/TamilMap.html

@planemad
Copy link
Contributor

planemad commented Jun 1, 2017

Also the first Kannada world map by @yogiks http://yogiks.github.io/osm-kn/map/

Tamil Map
The names are to be rendered as "భారతదేశం", "హైదరాబాద్", ...

It seems like Mapzen tiles and renderer are more suited for making multlingual maps compared to Mapbox. They expose all OSM tags (correct @srikanthlogic ?) and the tangram GL renderer supports complex text shaping for linear labels which has not landed in Mapbox GL mapbox/mapbox-gl-native#7774. There is complex text shaping for the raster Mapbox tiles though.

Tracking similiar ticket for multilingual maps on openstreetmap.in osm-in/osm-in.github.io#14

Is it possible to add custom name_* fields for tiles in Mapbox Studio? If not, generating (and re-using OSM.in) tilesets is the only option for now. We could definitely start with reusing them!

No, the default Mapbox tiles cannot be modified. Creating custom tiles is the only option. Tools to use for this:

  • osmlazer for .osm.pbf -> geojson of required features
  • tippecanoe for geojson -> mbtiles to upload to Mapbox

@srikanthlogic
Copy link

srikanthlogic commented Jun 1, 2017

It seems like Mapzen tiles and renderer are more suited for making multlingual maps compared to Mapbox. They expose all OSM tags (correct @srikanthlogic ?)

Yes, Mapzen tiles include all OSM tags and all one needs to take care is styling and data.

and the tangram GL renderer supports complex text shaping for linear labels.

They also added support for curved labels a while back but havent tested it much though.

@tallytalwar
Copy link

Hey

I randomly got to this issue in my quest for something else, but being on the tangram team I can confirm the above from @srikanthlogic. We do have support for curve labels for all scripts except for Mongolian. If you have further questions on it, feel free to ping me or anyone on tangram gitter channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants