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

Importing geolocation data (lat/lon) from XML into iframe

0

Hi all,

I'm very overwhelmed with information and am very confused with the process of displaying maps (the way I want) on my website.

I understand that I can grab the iframe and paste it on my website, which is great. However, I am importing geolocation data from an XML file so I have lots of different locations. I tried editing the iframe with the lat/long information I have from the XML file but it breaks the map. I'm assuming the process is a little more advanced than I thought?

Is there an easy way for me to just add custom lat/long data?

I'm very sorry if I'm misunderstanding something here.

Thanks

asked 09 Feb '22, 12:51

CRugman's gravatar image

CRugman
11111
accept rate: 0%


One Answer:

3

Hi.

Unfortunately the iframe code from opentreetmap.org is only meant to display a simple map, optionally with a single marker.

You'll need to write your own code, using the Leaflet js framework for example.

Or you could import your data in uMap (or other similar service), and display this map in an iframe.

Regards.

answered 09 Feb '22, 18:34

H_mlet's gravatar image

H_mlet
5.4k1781
accept rate: 13%

Source code available on GitHub .