-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhtml_script.js
More file actions
executable file
·55 lines (39 loc) · 1.88 KB
/
html_script.js
File metadata and controls
executable file
·55 lines (39 loc) · 1.88 KB
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
const image = require("./assets/location.png")
const html_script = `
<!DOCTYPE html>
<html>
<head>
<title>Quick Start - Leaflet</title>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0">
<link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js" integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew==" crossorigin=""></script>
<style>
.leaflet-container {
background: #000;
}
html body .leaflet-control-container .leaflet-top .leaflet-control-zoom a.leaflet-control-zoom-in { background-color: #121212; color:#ebdbb2}
a.leaflet-control-zoom-out {background-color:#121212; color:#ebdbb2;}
</style>
</head>
<body style="padding: 0; margin: 0">
<div id="mapid" style="width: 100%; height: 100vh;"></div>
<script>
var mymap = L.map('mapid', {zoomControl:true}).setView([38.447008, 27.148676], 5);
mymap.attributionControl.setPrefix(false)
var greenIcon = L.icon({
iconUrl: 'https://play-lh.googleusercontent.com/ZY35Ozawf1rX15ndsI9oiBl5Xz0-PnsJJDGE8YcNiirqd1yWwZdXBjmYiJpCfLJmCQ=w240-h480-rw',
iconSize: [30, 30], // size of the icon
iconAnchor: [20, 40], // point of the icon which will correspond to marker's location
popupAnchor: [-3, -76] // point from which the popup should open relative to the iconAnchor
});
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
maxZoom: 18,
id: 'mapbox/dark-v11'
}).addTo(mymap);
</script>
</body>
</html>
`
export default html_script