1 (edited by ag82lus 2023-12-22 09:40:47)

Topic: Show .OSM file on screen

Hi,

I have exported .osm file from openstreetmap of a small area and i am looking to read that osm file and display it on the screen,
along with that get the lat, lon and add marker, add lines on the map after display.
If anybody has an idea how to achieve this please share.
Any feedback and suggestions in this regard would be of great help.
Thank you

Re: Show .OSM file on screen

Hello.

Unfortunately, Online Maps cannot work with such files.
You will need to implement reading and displaying of this data yourself.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Show .OSM file on screen

Hi Alex,

Thank you the response.
Since i am new to this map loading in Unity, can please share some suggestions or guide for a good starting point to deal with such a requirement.
Any suggestion from you would be of great value and help.

Re: Show .OSM file on screen

I've never worked with OSM files, so my recommendations will be generic for unknown file formats.

First of all you need to understand what the file contains.
After a bit of googling I found that it can contain XML, JSON or PBF.
Accordingly, depending on the content you need to load it differently and work with the data differently.

OK, you've loaded the data, now you need to understand what the data contains.
Possible options:
* Lines and polygons you have to draw using Drawing API.
* Texts (e.g. object names) you should display using TextMeshPro.
* Some other elements should be displayed in their own way.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.