How to locate leaflet zoom control in a desired position

前端 未结 6 932
鱼传尺愫
鱼传尺愫 2020-12-08 19:11

I want to place the zoom control in middle right of the the map i.e. in the middle of the right most side of the map. I have found solution to put the zoom control in differ

6条回答
  •  萌比男神i
    2020-12-08 19:46

    Simplest and Accurate

    var map = L.map('map', {
        maxZoom: 20,
        minZoom: 6,
        zoomControl: false
    });
    
    L.control.zoom({
        position: 'bottomright'
    }).addTo(map);
    

提交回复
热议问题