Skip to content

Incorrect logic for enabling transliteration on map #1485

@deevroman

Description

@deevroman

It seems like name=* is always transliterated now. Only if the object has name:<interface language> is the correct name displayed.

This means that to display a local name, you need name + name:<interface language>. This works for significant objects. But objects like streets and shops usually only have name.

https://osmapp.org/ru/#17.27/59.9368/30.4887


I tried to understand the code, probably the code we are interested in is:

const languageControl = new OpenMapTilesLanguage({
defaultLanguage: intl.lang,
});
map.addControl(languageControl);

And probably style sections like this:

'text-field': '{name:latin} {name:nonlatin}',

Judging by the style on the objects there should now be two languages, but in the Russian interface I only see inscriptions in Latin. Moreover, as soon as I set a breakpoint on new OpenMapTilesLanguage and continue execution, two object names appear on the map...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions