0

Hi all, I need to display the cities/states with their English names ? The app shows the map with the following source code in javascript ;

L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
    attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
    maxZoom: 18
}).addTo(map);

For a simple scenario, I should put a param into the url provided by OpenStreetMap Tile server. If the way like I stated, could you please provide the sytnax for it? Additionally, I've explored the way of changing name of places, and some people provided some ways in the following link ;

http://gis.stackexchange.com/questions/187863/change-the-language-of-osm-maps-in-qgis

  1. Render the tiles using the Mapnik toolchain or Maperitive using the name:en field instead of the name field for labelling. Add them with the TileLayer plugin to your project.

  2. Using the QuickOSM plugin, download elements that have a name:en tag, set the rendering to transparent, and label inside QGIS with the name_en field.

I could not understand the ways stated above. Could you please detail these way of solutions ? Putting in simple words ;

Is there any way of getting tiles with their English names from tile servers by setting needed parameters like name:en or whatever it is?

Thanks & Best Regards

asked 14 Nov '16, 17:09

Cranberries's gravatar image

Cranberries
11112
accept rate: 0%


3 Answers:
1

The tilelayer defined in your snippet "tile.osm.org" does not have latin names in it. Render your own tiles with latin names, and use the URL for that in place of "tile.osm.org".

In order to create a tile server, see examples such as this.

permanent link

answered 14 Nov '16, 17:24

SomeoneElse's gravatar image

SomeoneElse ♦
33.0k65343778
accept rate: 16%

Hi, Isn't there any other alternative way for this approach ? I mean, does OpenStreetmap have any options for the tile server with some language packs/options ?

Is the map in the following link also provided by a custom tile server ?

http://openstreetmap.in/demo/#9.08/38.3220/35.6500

The second question I would like to is, for the first solution you mentioned, how can I get the city/states name labels in English or Latin Alphabet?

Thanks & Best Regards,

(14 Nov '16, 18:29) Cranberries
1

There are 4 different styles available on osm.org and 2 of them show Latin names, but you'd need to check the terms of use before using in your own leaflet map.

Essentially OSM is data with which you can create your own map. Think of the styles on osm.org as examples.

Edit: Following re-reading several replies below this it's worth mentioning how you can see the "other" tile layers at OpenStreetMap.org. At the right-hand-side of the map display there are some icons. One of them, the fourth one down, looks like a "stack of books". If you hover your mouse over it (assuming you're using a PC and have a mouse, of course) a message displays "layers". If you click that you can choose between "standard map", "cycle map", "transport map" and "humanitarian". If you choose "cycle" or "transport", you'll notice that places with non-latin names have a latin name displayed after them. If you think that these other layers are a bit "hidden" and difficult to discover, I agree :)

(14 Nov '16, 20:14) SomeoneElse ♦

Hi, Could you please share one of them with me ? Is there any url for the style with Latin Aplhabet? I have no idea about the way applying solution you mentioned actually.. What do you mean by saying terms of use ? Is Latin name feature priced ?

(14 Nov '16, 21:01) Cranberries
2

To be clear, OpenStreetMap isn't designed as a map service you can use. It's some map data that you can contribute to and create your own maps from. Let's take Visakhapatnam as an example. In the openstreetmap.in example map, that's http://openstreetmap.in/demo/#9.54/17.6915/83.1969 . In the OSM data, it's http://www.openstreetmap.org/node/245641840 . You can see the available names that you can use to incorporate into maps there.

Various people have created maps that feature latin names - the cycle map and transport layers at openstreetmap.org among them. Another example is "Gnome Maps" which uses tiles from Mapbox (see here for the story of that).

(15 Nov '16, 00:06) SomeoneElse ♦
0

I did see the mention of 4 different styles. There was no link there. In your reply to my grumpy comment there is, but that goes to something about Gnome Maps and a whole lot of text and so forth and so on, ad infinitum.

The point that seems to be so hard to communicate is that OSM, itself, not in a layer, not in some other program, not in a script tweak, itself, needs to have a little button in the upper right corner which is a dropdown menu that allows you to choose the alphabet.

This is basic.

I do know you're not being rude. And I very much appreciate that you're not responding to me jumping up and down and shouting by doing the same! :)

permanent link

answered 18 Dec '16, 03:00

quixote7's gravatar image

quixote7
8112
accept rate: 0%

1

Re "... 4 different styles. There was no link there ..." I've expanded the comment above that explains how to get the the "layer" switcher on OpenStreetMap.org.

(18 Dec '16, 14:17) SomeoneElse ♦
-3

So if I understand SomeoneElse correctly, there's no way to get place names in alphabets that are familiar to the user. ?? Really? In order to use OpenStreetMaps without being a coder I need to read Hindi and Japanese and Arabic and Latin alphabet and, well, you know what I'm trying to say.

As if Wikipedia gave us information about everything, but if you wanted to know something about, say, Ulan Bator you had to be able to read Mongolian.

"OpenStreetMap isn't designed as a map service you can use." Indeed, apparently.

(Sorry to be so annoyed, and OSM is a truly great project, and I signed up years ago so I could contribute, and this factor is the one huge stumbling block that makes it impossible for me to use it most of the time. I came back to check since I figured it had to have been fixed by now, and instead I find this question.)

(And an answer that says, just like in the good old days, write your own program if you don't like it.)

(:REALLY?:)

permanent link

answered 17 Dec '16, 17:53

quixote7's gravatar image

quixote7
8112
accept rate: 0%

3

I suggest that you read some of the text that I've written above again, starting with "There are 4 different styles available on osm.org and 2 of them show Latin names" and making sure to include " Another example is "Gnome Maps" which uses tiles from Mapbox (see here for the story of that)."

I'm not trying to be rude (in fact, I'm deliberately trying not to be rude) but I think "the ability to follow a hyperlink" doesn't exactly fall into the category of "write your own program if you don't like it".

(17 Dec '16, 18:22) SomeoneElse ♦
1

The German and French communities made maps in resp. German and French which are available from their website. I think that OsmAnd, and app for Android also displays labels in the language of the user (or local language depending on a preset).

(18 Dec '16, 11:00) escada
3

What you're asking is a great thing to aim for, but (unless OSM was to be unacceptably English-centric) means generating and hosting map tiles for every language in the world. That's a big ask, especially - as stated several times in answers here - openstreetmap.org is not really intended as an end-user mapping site, but as a source of data for the world's mapping sites and applications. Even going from one to ten languages would be a massive jump.

In the medium to long term, this may perhaps be solved by moving to "vector tiles" (where the map is both drawn and displayed in your browser) rather than "raster tiles" (.png files that are drawn by the server and displayed in your browser). Moving to vector tiles is sure to happen sooner or later, but if you'd like to make it sooner rather than later, new developers are always welcome.

(18 Dec '16, 13:50) Richard ♦

powered by OSQA