-
Notifications
You must be signed in to change notification settings - Fork 0
/
_map.html
39 lines (37 loc) · 8.47 KB
/
_map.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
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" />
<style>
#mapd59d6feb9a98459d96539d88690fe0a2 {
height:100%;
}
</style>
</head>
<body>
<div id="mapd59d6feb9a98459d96539d88690fe0a2"></div>
<script text="text/javascript">
var map = L.map('mapd59d6feb9a98459d96539d88690fe0a2');
L.tileLayer(
"http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
{maxZoom:19, attribution: '<a href="https://github.com/jwass/mplleaflet">mplleaflet</a> | Map data (c) <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'}).addTo(map);
var gjData = {"type": "FeatureCollection", "features": [{"geometry": {"type": "LineString", "coordinates": [[88.3617287635, 22.5746620397], [88.3615319482, 22.5741308125], [88.3626852681, 22.5737404226], [88.3621462673, 22.5725127409], [88.3625765711, 22.5722898833], [88.3626983744, 22.5722543478], [88.3629381724, 22.5721718379], [88.3630815438, 22.5721142615], [88.3633705641, 22.5719933986], [88.3637256895, 22.5717807499], [88.3638457064, 22.5720777008], [88.364068846, 22.5719825954], [88.364113715, 22.5722331267]]}, "type": "Feature", "properties": {"color": "#0000FF", "opacity": 1, "weight": 1.0}}, {"geometry": {"type": "Point", "coordinates": [88.361728763499997, 22.574662039700002]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#0000FF\" /></svg>", "anchor_y": 4.0}}, {"geometry": {"type": "Point", "coordinates": [88.361531948199996, 22.574130812500002]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#0000FF\" /></svg>", "anchor_y": 4.0}}, {"geometry": {"type": "Point", "coordinates": [88.362685268099995, 22.5737404226]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#0000FF\" /></svg>", "anchor_y": 4.0}}, {"geometry": {"type": "Point", "coordinates": [88.362146267300005, 22.572512740899999]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#0000FF\" /></svg>", "anchor_y": 4.0}}, {"geometry": {"type": "Point", "coordinates": [88.362576571100007, 22.572289883300002]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#0000FF\" /></svg>", "anchor_y": 4.0}}, {"geometry": {"type": "Point", "coordinates": [88.362698374399997, 22.572254347800001]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#0000FF\" /></svg>", "anchor_y": 4.0}}, {"geometry": {"type": "Point", "coordinates": [88.362938172400007, 22.572171837900001]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#0000FF\" /></svg>", "anchor_y": 4.0}}, {"geometry": {"type": "Point", "coordinates": [88.363081543800007, 22.572114261500001]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#0000FF\" /></svg>", "anchor_y": 4.0}}, {"geometry": {"type": "Point", "coordinates": [88.363370564099995, 22.5719933986]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#0000FF\" /></svg>", "anchor_y": 4.0}}, {"geometry": {"type": "Point", "coordinates": [88.363725689500001, 22.5717807499]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#0000FF\" /></svg>", "anchor_y": 4.0}}, {"geometry": {"type": "Point", "coordinates": [88.363845706399999, 22.572077700800001]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#0000FF\" /></svg>", "anchor_y": 4.0}}, {"geometry": {"type": "Point", "coordinates": [88.364068845999995, 22.571982595400002]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#0000FF\" /></svg>", "anchor_y": 4.0}}, {"geometry": {"type": "Point", "coordinates": [88.364113715000002, 22.572233126699999]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#0000FF\" /></svg>", "anchor_y": 4.0}}, {"geometry": {"type": "Point", "coordinates": [88.361728763499997, 22.574662039700002]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#FF0000\" /></svg>", "anchor_y": 4.0}}, {"geometry": {"type": "Point", "coordinates": [88.364113715000002, 22.572233126699999]}, "type": "Feature", "properties": {"anchor_x": 4.0, "html": "<svg width=\"8px\" height=\"8px\" viewBox=\"-4.0 -4.0 8.0 8.0\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"> <path d=\"M -3.0 -3.0 L 3.0 -3.0 L 3.0 3.0 L -3.0 3.0 Z\" fill-opacity=\"1\" stroke=\"#000000\" stroke-width=\"0.5\" stroke-opacity=\"1\" fill=\"#007F00\" /></svg>", "anchor_y": 4.0}}]};
if (gjData.features.length != 0) {
var gj = L.geoJson(gjData, {
style: function (feature) {
return feature.properties;
},
pointToLayer: function (feature, latlng) {
var icon = L.divIcon({'html': feature.properties.html,
iconAnchor: [feature.properties.anchor_x,
feature.properties.anchor_y],
className: 'empty'}); // What can I do about empty?
return L.marker(latlng, {icon: icon});
}
});
gj.addTo(map);
map.fitBounds(gj.getBounds());
} else {
map.setView([0, 0], 1);
}
</script>
</body>