RodZill4 / godot-openstreetmap

Rendering 3d scenes from openstreetmap data...
MIT License
174 stars 40 forks source link

Guidance on using this? #8

Open dan-howitt opened 3 years ago

dan-howitt commented 3 years ago

Hi Is there any guidance/tutorials on using this, from a total beginner perspective? Looks amazing and I would love to use it in a community project I am trying to work on. I've downloaded the code from this github page as a zip, imported it into Godot - not sure where I go from there, to be honest. I've noticed an error in map.gd - says that _x and _y are already defined in the scope?

Thanks! Dan

RodZill4 commented 3 years ago

Hi Dan!

I think you should first have a look at how the demo is organized.

For example the test.tscn scene in openstreetmap_demos/simple directory: that scene has a node named "Map", that has an array named "map objects". This array contains scenes for all elements of the map (streets, buildings, trees etc.). Those scenes have an "update_data" method that is called whenever the (filtered) OpenStreetMap data is ready.

Downloading OSM data, parsing them, getting useful stuff into a simple data structure (and caching that on disk), is done automatically.

Please don't hesitate to ask if you have more specific questions (you can easily find me on Twitter or Discord if needed).

Have fun! Rod

dan-howitt commented 3 years ago

Thank you for a quick response. I changed the _x and _y to just x and y and then ran the demo's and they work now. Looks great!

I think the simple demo is more of what I would like, which is good because it seems like it would be the simplest? Im basically trying to create a really simple pokomon go style thing but with things to find relevant to my local area for local families to enjoy with their kids, would like to involve a little local history etc to make it interesting. And I'd like to have an avatar move around in relation to their GPS coordinates if its possible to use this for those purposes?

I have some coding experience but I am new to Godot, i'll have a good look and play around with it, love this package/addon - thank you for making this available to everyone! Really enjoying Godot, I like the Scene/Node style.

Take care!

cheers Dan

GeorgeS2019 commented 1 year ago

https://github.com/fcazalet/godot-osm-tilemap https://github.com/godotengine/godot-proposals/discussions/6913#discussioncomment-5948536