J
J
Jesus_newrba2018-11-29 05:18:38
OpenStreetMap
Jesus_newrba, 2018-11-29 05:18:38

How to import xml OSM into OpenLayers?

Hello, I would like to know how to import the xml file downloaded from OSM into OpenLayers.
Website in html (so far) with JS

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2018-11-29
@Jesus_newrba

To do this, you need to simplify the access information - by loading it into the database, and then output it from the database to GeoJSON - dividing it into tiles, or in its entirety - for the desired area.
https://wiki.openstreetmap.org/wiki/RU:Osm2pgsql
You can, of course, set Mapnik on the base, but I would output the vector - it's easier to work with specific objects with it - without needing to contact the server again.
Actually, everything is written here how to convert the entire area into GeoJSON without dividing it into tiles https://wiki.openstreetmap.org/wiki/GeoJSON

M
Moskus, 2018-11-29
@Moskus

No way. You don't need it. You need either ready-made tiles or vector data in GeoJSON.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question