This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

openlayers:add railway layer

0

how can i add railway lyaer in openlayers?

asked 04 Mar '19, 07:01

LeeYong's gravatar image

LeeYong
11112
accept rate: 0%

Which railway layer do you want to add?

(04 Mar '19, 13:06) SomeoneElse ♦

Country? China, mostly.

(04 Mar '19, 15:29) LeeYong
1

No, which railway layer. Many different maps have been created based on OSM data that show railway lines. Which one were you thinking of?

(04 Mar '19, 15:41) SomeoneElse ♦

transport map, and only has railway layers.

(04 Mar '19, 16:12) LeeYong

One Answer:

1

I'm guessing by "transport map" you're referring to this tile layer that appears at the OpenStreetMap.org website. If you want to use those tiles, see the links on that page for how to do so.

It isn't possible to choose "only some features" from an existing layer of raster tiles (though if you had access to the source of the map style you could create your own tiles to show what you want). Other map styles exist that might be closer to what you want - see here for more information.

This answer is marked "community wiki".

answered 04 Mar '19, 18:03

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

Source code available on GitHub .