How to update DynamicZoom example scene during mouse move and without loading texture?
Hey guys. The DynamicZoom example scene in Unity has the basic functionality (world pan and zoom) I need for the app I'm building. However the zoom and reload operations are a little hard to use. I'm wondering:
**1) How to make the map pan along with the mouse / finger movement? At the moment it only loads the tiles after the mouseUp / TouchReleased call, so users can't see the map pan with their input.
- Whenever I zoom / pan the black grid loading texture always appears. Its not easy to see where I'm zooming or panning. This is because after a pan or zoom the loading texture appears and then the tiles load in. Is there anyway to make it similar to google maps so that the tiles reload dynamically without showing the loading texture? Its ok if the tiles are blurry until the new tiles are loaded.**
Here's a great example of what I'm trying to achieve in Unity, it feels great: https://api.mapbox.com/styles/v1/mapbox/streets-v9.html?title=true&access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4M29iazA2Z2gycXA4N2pmbDZmangifQ.-g_vE53SD2WrJ6tFX7QHmA#14.52/53.4557/-2.376
Is this possible?
Thanks for any help guys Martin
Hi @cobaltplay
It looks like you might need to upgrade to 1.3 to get the latest examples.DynamicZoom example has been changed. Please try the new version of the example. On 1.3 the tiles load before mouse up. Maybe you can add a scroll script to QuadTreeCameraMovement to accomplish the scrolling that you're wanting.
As for the loading tiles, this is something that we're looking into for the future. In the meantime, we can see about ideas for a workaround.
@jordy-isaac - thanks for the reply and suggestion :) The ZoomableMap scene does work much better with the panning. I'll give the smooth scrolling a try using SmoothDamp or Lerp perhaps.
Yeah the loading tiles are still an issue. Do you know a work around to just not show the loading tiles when zooming / panning, and instead just the new tiles when ready? I think this would be a much better user experience because they can still orient themselves even if the tiles are temporarily blurry.
Thanks for the help on this :) Martin
@cobaltplay Unfortunately, there isn't a great workaround at this time. This is likely the way it will be for the foreseeable future as well. I'm going to close out this issue for now, but let us know if we can help with anything else.
@jordy-isaac - thanks for the follow up. No probs, I'll also have a play around with tile sizes and see if that works a little better. Looking forward to sharing what I'm working on in the coming weeks :)
All the best Martin