Search code examples
leafletopenstreetmap

How to add powerline layer in open street map using leaflet js?


I am trying to add power lines in the map as a layer. I am using leaftlet for making this webapp. is there any possibility to add this info as a layer into the map. Or any example regarding this?


Solution

  • Yes, it is possible, but not trivial. The optimal solution will depend on the amount of data you are willing to process (i.e. do you need power lines for a small city, or for a whole continent?).

    The process will probably involve extracting the power line data from a OSM planet dump (do read http://enipedia.tudelft.nl/wiki/Extracting_Power_Data_from_OpenStreetMap !), and then rendering that data as plain vector data (smaller sizes), raster tiles (backend work), or vector tiles (several approaches).