-
Notifications
You must be signed in to change notification settings - Fork 0
/
nearly-offline-map.html
72 lines (61 loc) · 18.3 KB
/
nearly-offline-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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>A (nearly) offline map</title>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
crossorigin=""/>
<!-- Make sure you put this AFTER Leaflet's CSS -->
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew=="
crossorigin=""></script>
<style>
#mapid { height: 800px; }
</style>
</head>
<body>
<div id="mapid"></div>
<script type="text/javascript">
var mymap = L.map('mapid').setView([34.6806333,-62.2774896], 3);
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
maxZoom: 18,
id: 'mapbox/streets-v11',
tileSize: 512,
zoomOffset: -1,
accessToken: 'YOUR ACCESS TOKEN' //PUT YOUR MAPBOX ACCESS TOKEN HERE
}).addTo(mymap);
var MarkerIcon = L.Icon.extend({
options: {
iconSize: [50, 50],
iconAnchor: [25, 50],
popupAnchor: [0, -50]
}
});
// put your icons here
var defaultIcon = new MarkerIcon({iconU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+xRGzrxC8IrS1TU5YpTQ5BtbT5HyakgSD9DasZ0Y48+Q0L/s3UvmDL2VOSGzqkhCFmpqsVf9HXLqSLINn1BasUpkyF1+lfSbjgs84/DVQfSLf8DyiWTMC0kAcIAAAAASUVORK5CYII='});
// put your geojson here
var geojsonFeature = {"type": "FeatureCollection", "features": [{"type": "Feature", "geometry": {"type": "Point", "coordinates": [-64.34309, 18.72724]}, "properties": {"info": "ANEGADA"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-63.068615, 18.220554]}, "properties": {"info": "ANGUILLA"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-61.81752, 17.07466]}, "properties": {"info": "ANTIGUA"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [2.223667, 6.658839]}, "properties": {"info": "ATLANTIQUE"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-59.5432, 13.19389]}, "properties": {"info": "BARBADOS"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-61.77073, 17.6268]}, "properties": {"info": "BARBUDA"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-64.7505, 32.3078]}, "properties": {"info": "BERMUDES"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-64.7505, 32.3078]}, "properties": {"info": "BRESIL"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [81.2546, 19.3133]}, "properties": {"info": "CAYMAN"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [74.297333, 4.570868]}, "properties": {"info": "COLOMBIE"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-83.75343, 9.74892]}, "properties": {"info": "COSTA-RICA"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-77.78117, 21.52176]}, "properties": {"info": "CUBA"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-68.99002, 12.16957]}, "properties": {"info": "CURACAO"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-61.37098, 15.415]}, "properties": {"info": "DOMINIQUE"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-56.08472, 1.89033]}, "properties": {"info": "FRONTIERE GUYANO-BRESILIENNE"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-61.679, 12.1165]}, "properties": {"info": "GRENADA"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-61.551, 16.265]}, "properties": {"info": "GUADELOUPE"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-58.93018, 4.86042]}, "properties": {"info": "GUYANA"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-53.12578, 3.93389]}, "properties": {"info": "GUYANE"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-72.28521, 18.97119]}, "properties": {"info": "HAITI"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-86.2419, 15.2]}, "properties": {"info": "HONDURAS"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-64.89634, 18.33576]}, "properties": {"info": "ILES\u00a0VIERGES\u00a0(USA)"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-77.29751, 18.10958]}, "properties": {"info": "JAMAIQUE"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-61.02417, 14.64153]}, "properties": {"info": "MARTINIQUE"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-102.552784, 23.634501]}, "properties": {"info": "MEXIQUE"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-62.187366, 16.742498]}, "properties": {"info": "MONTSERRAT"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-62.579603, 17.155356]}, "properties": {"info": "NEVIS"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-66.590149, 18.220833]}, "properties": {"info": "PORTO-RICO"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-8.224454, 39.399872]}, "properties": {"info": "PORTUGAL"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-70.162651, 18.735693]}, "properties": {"info": "REPUBLIQUE\u00a0DOMINICAINE"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-63.232676, 17.635464]}, "properties": {"info": "SABA"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-64.858516, 17.705845]}, "properties": {"info": "SAINT-CROIX"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-60.978893, 13.909444]}, "properties": {"info": "SAINTE-LUCIE"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-62.973555, 17.489031]}, "properties": {"info": "SAINT-EUSTATIUS"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-62.755904, 17.34338]}, "properties": {"info": "SAINT-KITT'S"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-63.052251, 18.08255]}, "properties": {"info": "SAINT-MARTIN"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-64.8941, 18.3381]}, "properties": {"info": "SAINT-THOMAS"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-61.2872, 12.9843]}, "properties": {"info": "SAINT-VINCENT"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-62.783, 17.3578]}, "properties": {"info": "ST-KITT'S"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-56.027783, 3.919305]}, "properties": {"info": "SURINAM"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-61.222503, 10.691803]}, "properties": {"info": "TRINIDAD\u00a0ET\u00a0TOBAGO"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-66.58973, 6.42375]}, "properties": {"info": "VENEZUELA"}}]}
L.geoJSON(geojsonFeature, {
pointToLayer: function (feature, latlng) {
switch (feature.properties.info) {
case 'ATLANTIQUE': return L.marker(latlng, {icon: IconOne});
case 'BARBADOS': return L.marker(latlng, {icon: IconTwo});
case 'PORTUGAL': return L.marker(latlng, {icon: IconThree});
default: return L.marker(latlng, {icon: defaultIcon});
}
},
onEachFeature: function onEachFeature(feature, layer) {
// add another feature with HTML in it and serve it as pop-up instead of .info
if (feature.properties && feature.properties.info) {
layer.bindPopup(feature.properties.info);
}
}
}).addTo(mymap);
</script>
</body>
</html>