增加地图最大缩放级别
Increase map max zoom level
是否可以增加地图的最大缩放级别?默认情况下它是 18,但我需要大约 25-30。
使用最新的 React-Leaflet,MaxNativeZoom
什么都不做。
示例代码:
<Map center={[55, 55]} zoom={18} maxNativeZoom={30}>
<TileLayer
attribution='&copy <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
<FeatureGroup>
<EditControl position="topright" onCreated={this.onCreated} />
</FeatureGroup>
{this.state.positions.map((position) => (
<Marker position={[position.lat, position.lng]}></Marker>
))}
</Map>
将 maxZoom
添加到您的地图。
<Map center={[55, 55]} zoom={18} maxZoom={30}>
是否可以增加地图的最大缩放级别?默认情况下它是 18,但我需要大约 25-30。
使用最新的 React-Leaflet,MaxNativeZoom
什么都不做。
示例代码:
<Map center={[55, 55]} zoom={18} maxNativeZoom={30}>
<TileLayer
attribution='&copy <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
<FeatureGroup>
<EditControl position="topright" onCreated={this.onCreated} />
</FeatureGroup>
{this.state.positions.map((position) => (
<Marker position={[position.lat, position.lng]}></Marker>
))}
</Map>
将 maxZoom
添加到您的地图。
<Map center={[55, 55]} zoom={18} maxZoom={30}>