GithubHelp home page GithubHelp logo

Comments (5)

ZeLonewolf avatar ZeLonewolf commented on August 12, 2024

An example of language switching can be found here:
https://openmaptiles.org/languages/native/#0.56/0/0

from openstreetmap-americana.

ZeLonewolf avatar ZeLonewolf commented on August 12, 2024

Perhaps we could use something like Electron to create a tray: https://stackoverflow.com/questions/40485102/rich-html-tray-menu-in-a-desktop-web-application

from openstreetmap-americana.

1ec5 avatar 1ec5 commented on August 12, 2024

As of #581, the user can switch the label language by adding &language=, followed by one or more IETF BCP 47 language tags, to the hash part of the URL. This issue tracks an in-page control for switching the language.

As far as I know, this OpenMapTiles YAML file enumerates the ISO 639 language codes for which Planetiler adds name:* fields to the vector tiles. Intl.DisplayNames can turn these language codes into human-readable language names in either the original language or the user’s preferred language.

This project supports specifying a list of fallback locales. If we want the control to support that as well, then the ideal control would be a token field, which is not supported natively by the DOM but is available from a number of libraries.

from openstreetmap-americana.

1ec5 avatar 1ec5 commented on August 12, 2024

#609 adds a read-only display of the label language fallback list.

from openstreetmap-americana.

ZeLonewolf avatar ZeLonewolf commented on August 12, 2024

Here is a proposed workflow for using simplistic text links:

image

from openstreetmap-americana.

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.