1 (edited by savvas_6 2023-09-30 19:07:18)

Topic: Elevation Tiles


Im modify OnlineMapsTiledElevationManager to read elevation tiles only from zoom 13 and I load elevation tiles from Streaming Assets for a specific area.

I notice that while I zoom out, the map using the following code, is not zooming out "smooth" enough. It gets a little bit laggy.

I use this code for Zoom out:

public void ZoomIn() {

            if (!isAnim) {
                startZoom = OnlineMaps.instance.zoom;
                targetZoom = OnlineMaps.instance.zoom + 1;
                progress = 0;
                isAnim = true;

// Smooth Zoom
void Update() {

            if (progress <= 1 && isAnim) {
                progress += Time.deltaTime / duration;

                if (progress >= 1) {
                    progress = 1;
                    isAnim = false;               

                float zoom = Mathf.Lerp(startZoom, targetZoom, progress);
                OnlineMaps.instance.floatZoom = zoom;

I also noticed that on a windows 10 and above the 3D elevation is not visible on map, its flat. It loads tiles, I can read elevation values for a specific coordinates. On Mac OSX standalone the 3D elevation is visible. This issue happening only on windows 10 and above.

Post's attachments

Attachment icon OnlineMapsTiledElevationManager.cs 13.45 kb, 34 downloads since 2023-09-30 

Re: Elevation Tiles


What do you mean by "a little bit laggy"?

In general, your code looks correct (I haven't tested it), except for two things:
1. ZoomIn method won't do anything if the animation is already running.
2. If you currently have a non-integer zoom (like 13.6), ZoomIn method will do an animation from 13 to 14 which will look like a jump.

Unfortunately, I can't comment on how elevations work on Win10, 11 because the class you attached doesn't have your implementation of loading from Streaming Assets.
First of all you need to look for a problem in the loading implementation.

Kind Regards,
Infinity Code Team.

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

Re: Elevation Tiles

Problem solved. Just found the problem.

My app is a standalone and works offline.

I was loading elevation tiles from streaming assets and for missing tiles was requesting through  OnlineMapsMapboxElevationManager.instance.StartDownloadElevationTile(tile) and that was causing the small delay!! Because there was no internet connection and was requesting to download those missing tiles. I modify the code and now works. Also the Win 10 issue solve too.

thank you very much!