Sie sind hier : basti1012.de/ Kurze-Scripte-und-Codeschnipsel / index.php

Zurück


Der Quellcode dazu


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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!doctype html>

<html lang="de">

<head>

<script src="https://api.mapbox.com/mapbox.js/v2.3.0/mapbox.js"></script>

<link rel="stylesheet" href="https://api.mapbox.com/mapbox.js/v2.3.0/mapbox.css">

<title>Text-Datei in HTML</title>

<style>

*{

  margin:0;

  padding:0;

}

#map{

  border:1px solid black;

}

 

#map{

  width:100vw;

  height:100vh;

}

path:hover {

   fill: green;

  stroke-width: 15;

  dd;

    stroke: blue;

}



</style>

</head>

<body>

 

<div id="map"></div>

 <script>

   lat='52.2900';

lng='8.9400';

zoom=9;



var map = L.map('map').setView([lat, lng], zoom);



L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {

  maxZoom: 18,

  id: 'mapbox.streets'

}).addTo(map); 





var polygon1 = L.circle([lat, lng], 1500, {

  color: 'red',

  fillColor: '#f03',

  fillOpacity: 0.5

}).addTo(map).bindPopup(map).bindPopup("<b>Minden</b><br />lat "+lat+"<br>ing "+lng+" <br>").openPopup();







 

   

  </script>

  </body>

</html>