microsoft / MapsSDK-Unity

This repository contains samples, documentation, and supporting scripts for Maps SDK, a Microsoft Garage project.
MIT License
648 stars 127 forks source link

UTM 3D data and map #185

Closed joanslb closed 2 years ago

joanslb commented 2 years ago

Hello,

My goal is to have some existing data (in UTM projected coordiantes) to display on top of a map that would adjust its resolution depending on the view point.

I spent some time to try to align the UTM 3D data inside Unity with a map object. My approach was to set the x,y transform of the map to given point of the model and set the lat lon accordingly. Then I compute MapScaleRatioExtensions.ComputeUnityToMapScaleRatio in order to set the map zoom to match unity scale. Unfortunately this approach is not working.

I believe I'm not going in the right direction. Can the map SDK adress this goal ?

Thanks for your help,

Joan

kircher1 commented 2 years ago

It wasn't clear to me if you're intending for the UTM data to have a dynamic resolution or if you are expecting the map to have a dynamic resolution. If it's the latter, no that's unfortunately not supported. The map can only be rendered at discrete zoom levels, and while your approach for scaling the map should provide a realistic size, the resolution won't be great. So, if that's the goal, the SDK can't address it now. #2 has been tracking that but currently the map has only this "tabletop", discrete zoom level sort of form factor.

joanslb commented 2 years ago

Thanks for your answer. When computing MapScaleRatioExtensions.ComputeUnityToMapScaleRatio it doesn't provide a zoom for MapRenderer.zoom that aligns map with Unioty data. Is this expected ? Can this be computed ? Cheers.