S
S
ssssergey2015-01-07 13:56:06
Software and Internet Services
ssssergey, 2015-01-07 13:56:06

How to set the display language of foreign settlements in Russian in the Maperitive program (map rendering)?

I found this expression
text : @any(, , name)
but how to use it in the program?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Moskus, 2015-01-08
@ssssergey

The documentation for the text property is here:
maperitive.net/docs/Properties/Text.html
Accordingly, @any() selects any key from the parenthesized list in order.
If you are rendering a map of Russia, then the name key contains the Russian name by default. So it’s enough to write:
If this is a map of another country, you should not expect the mandatory presence of names in Russian, but if they do exist, they will be contained in name: ru, so the code will be like this:
In this case, if there is a Russian-language name it will be displayed, in the absence - name will be selected.
If we are talking about a country with some alphabet that you do not know (Japan, for example) - add and / or there to replace hieroglyphs with Latin with some probability.
If you definitely need only Russian-language names, but they are not in the source data, you will have to process the data yourself and add transliteration or something similar there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question