JSFiddle - React, Tailwind, and code Playground
by shitao1988
HTML
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css">
<script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
<div id="map" style="width: 600px; height: 400px"></div>
JavaScript
var map = L.map('map').setView([30, 118], 4);
L.tileLayer('http://{s}.mapabc.com/mapabc/maptile?&x={x}&y={y}&z={z}', {
subdomains: ["emap1", "emap2", "emap3"]
}).addTo(map);
var marker = L.marker([30, 118],
{draggable: true, // 使图标可拖拽
title: 'Text', // 添加一个标题
opacity: 0.5} // 设置透明度
)
.addTo(map)
.bindPopup("<b>中国</b><br>安徽黄山.")
.openPopup();