This is a migrated thread and some comments may be shown as answers.

Map zooming issue

1 Answer 118 Views
Map
This is a migrated thread and some comments may be shown as answers.
Auvo
Top achievements
Rank 1
Auvo asked on 25 Aug 2020, 12:33 PM

Hi,

I need to set zoom level to 14,5 but when I use decimals, map location changes.

 

 

Figure 1 shows when zoom level is 14, then the place is correct

Figure 2 show when zoom level is set to 14,5 , then map is located in totally different place ???

 

Following map link is used to generate map:

https://#= subdomain #.tile.thunderforest.com/landscape/#= zoom #/#= x #/#= y #.png

 

- Auvo -

 

 

1 Answer, 1 is accepted

Sort by
0
Doncho
Telerik team
answered on 28 Aug 2020, 10:32 AM

Hi Auvo,

The reason for the experienced behavior is setting the zoom to a decimal number. Setting the zoom level to 14,5 is resolved to 15.

In general, with map tiles, the zoom levels are standard to a range of integers from 0 - 18. That being said, the level cannot be manipulated due to the tile size calculations and rendering limitations for the browser.  For more details about zoom levels, please take a look at these resources from OpenStreetMap and Microsoft.

I hope this clarifies the origin of the issue. I am afraid currently there is nothing we can suggest for overcoming that behavior. Please let me know if you have any questions!

Kind regards,
Doncho
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
Map
Asked by
Auvo
Top achievements
Rank 1
Answers by
Doncho
Telerik team
Share this question
or