Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

World Scale #1811

Closed
RomanAtBrief opened this issue Aug 29, 2021 · 4 comments
Closed

World Scale #1811

RomanAtBrief opened this issue Aug 29, 2021 · 4 comments

Comments

@RomanAtBrief
Copy link

Hey guys,

I am currently developing an app for urban design. Basically a user selects a site on the map and starts drawing roads and buildings.
I have a question regarding scale. All generated roads and buildings are in 1unit = 1m scale.

  1. How to make actual map be the same scale as the geometry? And allow user to zoom in and out?
  2. Also should I use GitHub version of SDK or from your webpage?
  3. Looks like there is some movement on GitHub, but sdk haven't been updated for a while now. Do you have any date in mind for the update? So we all can celebrate it :)

Thank you

@RomanAtBrief
Copy link
Author

Anyone?
I have tried provided examples but could find what I am looking for.
I basically want dynamically place Game objects at specific places on zoomable map

@Markovicho
Copy link

Markovicho commented Sep 7, 2021

To allow the user to zoom in and out you should consider checking out the ZoomableMap sample scene containing QuadTreeCameraMovement script.

To spawn a gameobject on a specific geocoordinate you will have some helper functions in the AbstractMap.cs class which will help you out:

  • Spawn at specific geo coordinate--> Instantiate with Unity's function "GameObject.Instantiate". To get the coorect unity world positiong matching the map coordinate you will have to use Map.GeoToWorldPosition().
  • Register for Map.OnUpdated and update the position of the gameobject to keep in sync with the map

the latest sdk release is indeed pretty pretty old and has very poor tile loading performance. I would advise to switch directly to the branch mentioned in here: #1671

we are working now for a while on our project based on this branch and it feels pretty stable

@RomanAtBrief
Copy link
Author

Thank you @Markovicho
It is very helpful. I will into actual scripts a bit more. Still new to SDK.
It looks very cool. Just documentation is very basic.
Will probably be asking questions here :)

Looking at the link you gave looks like I have to install Performance branch.
Have you tried it? Does it work with URP?

@brnkhy
Copy link
Contributor

brnkhy commented Oct 8, 2021

just so the question is answered, yes it supports URP :)

thanks a lot for help @Markovicho, I really appreciate it 🙇

@brnkhy brnkhy closed this as completed Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants