PinchZoom with Openstreetmap creates invalid URL

Hi

I face a problem with the Maps component (version 23.2.4). If I zoom the map by click with the mouse or on the buttons, the URL is valid and zoom is working.

If I use the touchscreen (or a mobile device), the zoom level is not rounded, and the generated URL contains a decimal separator which cannot be handled by OpenStreeMaps.

This is an invalid request:

https://a.tile.openstreetmap.org/16.229272968476153/40082/27406.png

A valid URL would be

https://a.tile.openstreetmap.org/16/40082/27406.png

I tried setting a manual urlTemplate (
https://tile.openstreetmap.org/level/tileX/tileY.png)

on the map, but couldn't figure out how the value of level is set.


Thanks for your help
Chris





6 Replies

IR Indumathi Ravi Syncfusion Team February 27, 2024 10:41 AM UTC

Hi Chris,


In the Maps component, online maps such as OpenStreetMap currently do not support pinch zooming due to the decimal value appended in the URL. We have considered this as a usability issue and added it to our feedback portal. Based on our assessment, it requires some architecture changes. We will include this implementation in our Volume 1 SP Release, which is expected to be available by the end of April 2024. Meanwhile, please find the feedback link below to keep track of the reported improvement.

https://www.syncfusion.com/feedback/51262


Please let us know if you need any further assistance.



IR Indumathi Ravi Syncfusion Team May 10, 2024 07:37 AM UTC

Hi Chris,


We have implemented the improvement -Support for pinch zooming with online maps in the Maps component” and it is included in our Essential Studio 2024 Volume 1 SP release v25.2.3 which is rolled out and is available for download under the following link.


https://www.syncfusion.com/forums/188185/essential-studio-2024-volume-1-service-pack-release-v25-2-3-is-available-for-download


Root Cause:

When we pinch zoom the map, the tile images were not visible due to incorrect calculation of the zoom factor value. However, we have now calculated the zoom factor properly, and the tile images are visible properly.


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.



CH Chris June 26, 2024 02:58 PM UTC

Hi
We updated to the latest version. I can confirm it is working now. But pinch zoom on mobile phones is far too sensitive and not really usable. A movement of like on millimetre on the phone almost zooms the whole continent. Is there a way to reduce the sensitivity? It tried to kind of debounce it with an onZoom event and a time window in which we cancel the event, but this doesn't really work.

BEs regards,

Chris



IR Indumathi Ravi Syncfusion Team June 28, 2024 05:32 AM UTC

Hi Chris,


Thank you for the update.


The current implementation of pinch zooming relies on the tile server URLs provided by online maps such as OpenStreetMap, Azure Maps, and others, which deliver map images supporting only whole number zoom levels displayed as HTML image tags within the component. Consequently, our Maps component does not currently support decimal zoom levels for the online maps, resulting in abrupt zoom transitions.


To improve the zooming experience, we recognize the need to refine our approach to online map rendering. Specifically, we need to adjust how zoom factors are calculated to incorporate decimal precision. Given that images for decimal zoom levels are not available, our solution involves scaling up to the nearest higher zoom image and then adjusting it to match the current zoom factor.


Implementing this enhancement is complex within our current implementation. Therefore, we plan to implement this feature in any of our upcoming releases to ensure a more refined zooming experience in the Maps component. We appreciate your understanding and patience as we work to enhance this functionality.


Meanwhile, please find the feedback link below to keep track of this improvement.

https://www.syncfusion.com/feedback/59040



CH Chris November 26, 2024 01:55 PM UTC

Hi
Is there any update on this? This is getting more important, as we want to use Tablets for our applicaiton UI. And there pinch zoom which is working is quite essential. Do you have any ETA when this is implemented in a working way?


Best regards,

Chris



SA Sabari Anand Senthamarai Kannan Syncfusion Team November 27, 2024 08:42 PM UTC

Hi Chris,


Sorry for the inconvenience caused.


We understand that smooth pinch-zoom support for online map providers is important to you. We have attempted to implement this improvement twice this year. However, the complexity of calculating the zoom factor for pinch zooming caused us to postpone the implementation. However, we have now planned to include this improvement in our 2025 Volume 1 release. We will inform you once the release is available.


Loader.
Up arrow icon