|
1 | 1 | <!DOCTYPE html>
|
2 | 2 | <head>
|
3 |
| - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
4 |
| - <script>L_PREFER_CANVAS=false; L_NO_TOUCH=false; L_DISABLE_3D=false;</script> |
5 |
| - <script src=" https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.js" ></script> |
6 |
| - <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> |
7 |
| - <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> |
8 |
| - <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script> |
9 |
| - <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.0.0/leaflet.markercluster.js"></script> |
| 3 | + <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
| 4 | + <script>L_PREFER_CANVAS=false; L_NO_TOUCH=false; L_DISABLE_3D=false;</script> |
| 5 | + <script src=" https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.js" ></script> |
| 6 | + <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> |
| 7 | + <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> |
| 8 | + <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script> |
| 9 | + <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.0.0/leaflet.markercluster.js"></script> |
10 | 10 |
|
11 |
| - <link rel=" stylesheet" href=" https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.css" /> |
12 |
| - <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/> |
13 |
| - <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/> |
14 |
| - <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/> |
15 |
| - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/> |
16 |
| - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.0.0/MarkerCluster.Default.css"/> |
17 |
| - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.0.0/MarkerCluster.css"/> |
18 |
| - <link rel="stylesheet" href="https://rawgit.com/python-visualization/folium/master/folium/templates/leaflet.awesome.rotate.css"/> |
19 |
| - |
20 |
| - <style> |
21 |
| - |
22 |
| - html, body { |
23 |
| - width: 100%; |
24 |
| - height: 100%; |
25 |
| - margin: 0; |
26 |
| - padding: 0; |
27 |
| - } |
28 |
| - </style> |
29 |
| - <style> |
30 |
| - #map { |
31 |
| - position:absolute; |
32 |
| - top:0; |
33 |
| - bottom:0; |
34 |
| - right:0; |
35 |
| - left:0; |
36 |
| - } |
37 |
| - |
38 |
| - </style> |
39 |
| - |
40 |
| - <style> |
41 |
| - #{{ map_id }} { |
42 |
| - position:relative; |
43 |
| - {{ size }} |
44 |
| - left:0.0%; |
45 |
| - top:0.0%; |
46 |
| - } |
47 |
| - </style> |
| 11 | + <link rel=" stylesheet" href=" https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.css" /> |
| 12 | + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/> |
| 13 | + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/> |
| 14 | + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/> |
| 15 | + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/> |
| 16 | + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.0.0/MarkerCluster.Default.css"/> |
| 17 | + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.0.0/MarkerCluster.css"/> |
| 18 | + <link rel="stylesheet" href="https://rawgit.com/python-visualization/folium/master/folium/templates/leaflet.awesome.rotate.css"/> |
48 | 19 |
|
| 20 | + <style> |
| 21 | + html, body { |
| 22 | + width: 100%; |
| 23 | + height: 100%; |
| 24 | + margin: 0; |
| 25 | + padding: 0; |
| 26 | + } |
| 27 | + </style> |
| 28 | + <style> |
| 29 | + #map { |
| 30 | + position:absolute; |
| 31 | + top:0; |
| 32 | + bottom:0; |
| 33 | + right:0; |
| 34 | + left:0; |
| 35 | + } |
| 36 | + </style> |
| 37 | + <style> |
| 38 | + #{{ map_id }} { |
| 39 | + position:relative; |
| 40 | + {{ size }} |
| 41 | + left:0.0%; |
| 42 | + top:0.0%; |
| 43 | + } |
| 44 | + </style> |
49 | 45 | </head>
|
50 | 46 |
|
51 | 47 | <body>
|
52 |
| - |
53 |
| - <div class="folium-map" id="{{ map_id }}" ></div> |
54 |
| - |
| 48 | + <div class="folium-map" id="{{ map_id }}" ></div> |
55 | 49 | </body>
|
56 | 50 |
|
57 | 51 | <script>
|
| 52 | + var southWest = L.latLng({{ min_lat }}, {{ min_lon }}); |
| 53 | + var northEast = L.latLng({{ max_lat }}, {{ max_lon }}); |
| 54 | + var bounds = L.latLngBounds(southWest, northEast); |
58 | 55 |
|
59 |
| - var southWest = L.latLng({{ min_lat }}, {{ min_lon }}); |
60 |
| - var northEast = L.latLng({{ max_lat }}, {{ max_lon }}); |
61 |
| - var bounds = L.latLngBounds(southWest, northEast); |
62 |
| - |
63 |
| - var {{ map_id }} = L.map('{{ map_id }}', { |
64 |
| - center:[{{ lat }}, {{ lon }}], |
65 |
| - zoom: {{ zoom_level }}, |
66 |
| - maxBounds: bounds, |
67 |
| - layers: [], |
68 |
| - worldCopyJump: {{ world_copy_jump.__str__().lower() }}, |
69 |
| - crs: L.CRS.{{crs}} |
70 |
| - }); |
71 |
| - |
72 |
| - {% for tile in tile_layers %} |
73 |
| - var {{tile['id']}} = L.tileLayer( |
74 |
| - '{{tile['address']}}', |
75 |
| - { |
76 |
| - maxZoom: {{tile['max_zoom']}}, |
77 |
| - minZoom: {{tile['min_zoom']}}, |
78 |
| - continuousWorld: {{tile['continuous_world'].__str__().lower()}}, |
79 |
| - noWrap: {{tile['no_wrap'].__str__().lower()}}, |
80 |
| - attribution: '{{tile['attr']}}', |
81 |
| - detectRetina: {{tile['detect_retina'].__str__().lower()}}, |
82 |
| - subdomains: '{{tile['subdomains']}}' |
83 |
| - } |
84 |
| - ).addTo({{ map_id }}); |
85 |
| - {% endfor %} |
| 56 | + var {{ map_id }} = L.map('{{ map_id }}', { |
| 57 | + center:[{{ lat }}, {{ lon }}], |
| 58 | + zoom: {{ zoom_level }}, |
| 59 | + maxBounds: bounds, |
| 60 | + layers: [], |
| 61 | + worldCopyJump: {{ world_copy_jump.__str__().lower() }}, |
| 62 | + crs: L.CRS.{{crs}} |
| 63 | + }); |
86 | 64 |
|
| 65 | + {% for tile in tile_layers %} |
| 66 | + var {{tile['id']}} = L.tileLayer( |
| 67 | + '{{tile['address']}}', |
| 68 | + { |
| 69 | + maxZoom: {{tile['max_zoom']}}, |
| 70 | + minZoom: {{tile['min_zoom']}}, |
| 71 | + continuousWorld: {{tile['continuous_world'].__str__().lower()}}, |
| 72 | + noWrap: {{tile['no_wrap'].__str__().lower()}}, |
| 73 | + attribution: '{{tile['attr']}}', |
| 74 | + detectRetina: {{tile['detect_retina'].__str__().lower()}}, |
| 75 | + subdomains: '{{tile['subdomains']}}' |
| 76 | + }).addTo({{ map_id }}); |
| 77 | + {% endfor %} |
87 | 78 | </script>
|
0 commit comments