fatecasino
fatecasino

Reputation: 49

Getting OSM tile server to show English labels in openstreetmap

I want to build a small map app, but OSM shows the labels in local languages (Russian, Arabic, etc) .I want all the labels to be in English. What is mostly advised is to add the "en tag" but I really cannot find any example of how to do this.

My map object in JS is:

var map = L.map('map', {
  center: [mapCenterLat, mapCenterLon],
  zoom: 3,
  minZoom: 2
  });
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);

How should the tag get inserted in the osm url in order to show english labels only?

Upvotes: 1

Views: 5529

Answers (2)

Randika Wanninayaka
Randika Wanninayaka

Reputation: 171

You can use USGSTopo for English only it works file for me. code in OSMDroid is

map.setTileSource(new OnlineTileSourceBase("USGS Topo", 0, 18, 256, "",
            new String[] { "http://basemap.nationalmap.gov/ArcGIS/rest/services/USGSTopo/MapServer/tile/" }) {
        @Override
        public String getTileURLString(long pMapTileIndex) {
            return getBaseUrl()
                    + MapTileIndex.getZoom(pMapTileIndex)
                    + "/" + MapTileIndex.getY(pMapTileIndex)
                    + "/" + MapTileIndex.getX(pMapTileIndex)
                    + mImageFilenameEnding;
        }
    });

You can also follow link which provided in Osmdroid documentation. This is only for English not other languages. Please inform any one who had with other languages specially Russian.

Upvotes: 0

scai
scai

Reputation: 21469

See Map internationalization in the OSM wiki for a list of raster and vector tile servers that contain multilingual names.

Also take a look at Tiles in the OSM wiki, mapstyle.petschge.de, Leaflet Provider Demo and Map Compare for various OSM-based maps. Some of them have all-English place names.

Upvotes: 1

Related Questions