使用Leaflet-imageoverlay加载本地图片实现拖拽和缩放
原文地址
http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html
使用leaflet.js去平移和缩放大尺寸图像。
先上代码(本文写于18年7月17日,在原文作者的源代码中更新了使用最新的leaflet包):
<html>
<head>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css">
<style>
#image-map {
width: 100%;
height: 100%;
border: 1px solid #ccc;
margin-bottom: 10px;
}
<