Hi, I am using OSM with open layers, following is the code snippet. It loads the default world map. How can I load the OSM which does not have any country/city labels and country boundaries? I believe there should be some option to do that.
Any help is much appreciated. Atul asked 23 Oct '18, 12:25 Atul S |
You need to find a set of map tiles that doesn't have borders or create one yourself, or use a vector tile map source with a corresponding style. The long version: what you are currently doing is loading server side generated small (normally 256x256 pixel size) map images. These are pre-generate in one style and for that reason cannot be changed on the fly. To get around this you can either use a set of tiles without borders (you would have to google if you can find if something like that is available) or use vector tiles with a corresponding rendering style that doesn't show borders. Vector tiles contain preprocessed OSM data that then is rendered (that is turned in to a bitmap) locally on the clients computer. This allows the styling to be client specific and more flexible. answered 23 Oct '18, 12:29 SimonPoole ♦ 1
An example map style that doesn't show country boundaries at medium and high zooms is this one. If you'd prefer to use a different map style you can, but you'll to edit it so that administrative boundaries aren't shown. If you'd like to do this with OSM's standard style then you can use their docker container created for map design.
(23 Oct '18, 12:34)
SomeoneElse ♦
|