Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R leaflet Language of the map : Can we specify to use English language

Tags:

r

leaflet

I have just started to use leaflet package with Shiny in R. For regions like china, in the map the abbreviation is in Chinease language. Can this be changed to English?enter image description here

I searched for this on the web. But was not able to understand, where and how to search for this. Any help is greatly appreciated.

like image 997
Kumar Manglam Avatar asked Jul 28 '16 13:07

Kumar Manglam


People also ask

How do I change the language on Openstreetmap?

Go to openstreetmap.org, and login to your account. Then click on your user name, in the top right corner, which will take you to your user page. Then click on the link for "My settings". Part way down that page, there is a box for "Preferred Languages:".

What is leaflet package in R?

leaflet is an open-source JavaScript library that is used to create dynamic online maps. The identically named R package makes it possible to create these kinds of maps in R as well.


1 Answers

What you see on the map are Tiles, which are plain images generated by the Tile Server you specify (or use by default).

In your case, the Tile Server is OpenStreetMap: you will get the exact same tiles as on openstreetmap.org website (see for example: http://www.openstreetmap.org/#map=4/28.46/86.92)

As these are images, you will understand that you cannot change them.

Now you can change the Tile Server until you find one that serves images with names in the language you need.

Have a look at http://leaflet-extras.github.io/leaflet-providers/preview/ for example.

like image 126
ghybs Avatar answered Nov 07 '22 18:11

ghybs