-
Notifications
You must be signed in to change notification settings - Fork 1
/
t1.html
55 lines (48 loc) · 1.75 KB
/
t1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/leaflet.css">
<link rel="stylesheet" type="text/css" href="css/map.css">
<link rel="stylesheet" type="text/css" href="css/fontawesome/styles.min.css">
<script src="js/jquery-1.9.1.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/leaflet/leaflet.js"></script>
<script src="js/leaflet/leaflet.ajax.js"></script>
</head>
<body>
<div id="map"></div>
<script>
map = L.map('map').setView([10.1323395,106.5192586], 11);
var tilemap_srv='https://{s}.dothanhlong.org/basemap/hanhchinh/zxy/t2/thuyloibentre:thuyloibentre_bandonen_group/{z}/{x}/{-y}.png';
L.tileLayer(tilemap_srv, {
attribution: 'Map tiles by <a href="http://thuyloibentre.com" target="_blank">thuyloibentre.com</a>.'
}).addTo(map);
var view_cong_hientrang_geo_url='view_cong_hientrang_geo.json';
var view_cong_hientrang_geo= new L.GeoJSON.AJAX(view_cong_hientrang_geo_url, {
pointToLayer: function (feat, latlng) {
return L.marker(latlng, {
icon: L.divIcon({
html: "<span class='cong_label'><b>" + feat.properties.ten + "</b></span>",//style của label
popupAnchor: [0, 0],
iconAnchor: [8, 8],
className: 'mouse_pointer fa fa-circle cong_symbol' //style của pin
}),
title: feat.properties.ten,
interactive: true,
clickable: true,
fid: feat.properties.maso,
fname: feat.properties.ten,
tblname: 'view_cong_hientrang_geo'
}).on('click', function (e) {
var fid = (e.sourceTarget.options.fid);
var fname = (e.sourceTarget.options.fname);
var tblname = (e.sourceTarget.options.tblname);
var lat = e.latlng.lat;
var lon = e.latlng.lng;
});
}
});
view_cong_hientrang_geo.addTo(map);
</script>
</body>
</html>