We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Maximum Zoom Level in Blazor Maps

Hello, 

I'm using Blazor Package package version 17.2.0.46-beta

I'm trying to follow the examples in https://ej2.syncfusion.com/blazor/documentation/maps/providers/openstreetmap/ but running in to some trouble about the zooming.

When I have the zoom toolbar enabled, by mouse I can only zoom in to what seems to be a zoom factor of 9. Is this intentional?

I should note that when I manually set the ZoomFactor (per the example), the map is zoomed in further as I would like it, however at that point the zoom toolbar no longer works (I can pan, but cannot zoom in or out). 

Is there any plan to address this limitation?
My intention is to work with maps from State Level down to street level.

Thank you!



PS. The same limitation seems to appear when using Bing maps as well. Here is my code for OSM:


Zooming doesn't work

    <EjsMaps>
        <MapsZoomSettings Enable="true"
                          Toolbars='new string[]{"Zoom", "ZoomIn", "ZoomOut", "Pan", "Reset" }'
                          ZoomFactor="18">
        </MapsZoomSettings>
        <MapsLayers>
            <MapsLayer LayerType="@ShapeLayerType.OSM"> </MapsLayer>
        </MapsLayers>
        <MapsCenterPosition Latitude="42.4895" Longitude="-83.1446"></MapsCenterPosition>
    </EjsMaps>





Zooming works up to level 9

    <EjsMaps>
        <MapsZoomSettings Enable="true"
                          Toolbars='new string[]{"Zoom", "ZoomIn", "ZoomOut", "Pan", "Reset" }'
                          ZoomFactor="4">
        </MapsZoomSettings>
        <MapsLayers>
            <MapsLayer LayerType="@ShapeLayerType.OSM"> </MapsLayer>
        </MapsLayers>
        <MapsCenterPosition Latitude="42.4895" Longitude="-83.1446"></MapsCenterPosition>
    </EjsMaps>

3 Replies

BP Baby Palanidurai Syncfusion Team September 4, 2019 09:45 AM UTC

Hi Sorin, 

Greetings from Syncfusion. 

We have analyzed your query and checked your code snippet. We are having max zoom level as 10 by default. So that’s why when you zoom the maps by the toolbar zooming, maps will not zoom after the zoom level 10. If you want to zoom the maps using toolbar zooming more than zoom level 10, you can set the desired value to the maxZoom property. 

Code snippet: 
<EjsMaps> 
     <MapsZoomSettings Enable="true" 
           Toolbars='new string[]{"Zoom", "ZoomIn", "ZoomOut", "Pan", "Reset" }' 
           ZoomFactor="16" MaxZoom="20"> 
     </MapsZoomSettings> 
     <MapsLayers> 
        <MapsLayer LayerType="@ShapeLayerType.OSM"> </MapsLayer> 
     </MapsLayers> 
     <MapsCenterPosition Latitude="42.4895" Longitude="-83.1446"></MapsCenterPosition> 
</EjsMaps> 


This will work properly, when you zoom using the toolbar directly or using toolbar after programmatic zoom also. 
Kindly revert us, if you have any concerns. 

Regards, 
Baby. 



SO Sorin September 4, 2019 10:45 AM UTC

Hello Baby,

Thank you for the quick reply; that did the trick!
It's working perfectly now!

Sorin


BP Baby Palanidurai Syncfusion Team September 4, 2019 11:51 AM UTC

Hi Sorin, 
 
Most welcome. Kindly revert us, if you need any further assistance on this. We are always happy in assisting you. 
 
Regards, 
Baby. 


Loader.
Live Chat Icon For mobile
Up arrow icon