-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
162 lines (117 loc) · 4.54 KB
/
index.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
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html>
<head>
<title>how to create map </title>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.1/leaflet.css" />
<style type="text/css">
.leaflet-container{background-color:#c5e8ff;}
body, html {
margin: 0;
padding: 0;
width:100%;
height:100%;
}
</style>
</head>
<body>
<style>
.info {
padding: 6px 8px;
font: 14px/16px Arial, Helvetica, sans-serif;
background: white;
background: rgba(255,255,255,0.8);
box-shadow: 0 0 15px rgba(0,0,0,0.2);
border-radius: 5px;
}
.info h4 {
margin: 0 0 5px;
color: #777;
}
.legend {
text-align: left;
line-height: 18px;
color: #555;
}
.legend i {
width: 18px;
height: 18px;
float: left;
margin-right: 8px;
opacity: 0.7;
}
</style>
<div id="map" style="width: 100%; height: 100%"></div>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<link rel="stylesheet" href="walid.css" />
<script src="dist/leaflet.js"></script>
<script src="dist/leaflet.rotatedMarker.js"></script>
<link rel="stylesheet" href="src/Icon.Label.css" />
<script src="src/Icon.Label.js"></script>
<script src="src/Icon.Label.Default.js"></script>
<script>
var map = L.map('map').setView([30.354086618820002, 30.9578856290658], 3);
map.attributionControl.addAttribution('© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors & Develop by © <a href="https://edafait.com/">walid abdelazeem</a>');
L.tileLayer('Egypt/{z}/{x}/{y}.png', {
maxZoom: 13,
minZoom: 3,
tileSize: 512,
zoomOffset: -1
}).addTo(map);
L.tileLayer('AUST/{z}/{x}/{y}.png', {
maxZoom: 13,
minZoom: 3,
tileSize: 512,
zoomOffset: -1
}).addTo(map);
var LeafIcon = L.Icon.extend({
options: {
shadowUrl: 'Marker/leaf-shadow.png',
iconSize: [38, 95],
shadowSize: [50, 64],
iconAnchor: [22, 94],
shadowAnchor: [4, 62],
popupAnchor: [-3, -76]
}
});
var greenIcon = new LeafIcon({ iconUrl: 'Marker/leaf-green.png' });
L.marker([30.354086618820002, 30.9578856290658], { icon: greenIcon }).addTo(map)
.bindPopup("<b>Hello world!</b><br />I am a popup in EGYPT <br /> <img src='Marker/leaf-green.png' />.").openPopup();
var LeafIcon_2 = L.Icon.extend({
options: {
iconSize: [50, 82],
shadowSize: [50, 64],
iconAnchor: [22, 94],
shadowAnchor: [4, 62],
popupAnchor: [-3, -76]
}
});
var markers_icon = new LeafIcon_2 ({ iconUrl: 'Marker/marker-icon-2x.png' });
L.marker([-26.64991293944776, 153.06281312253793], { icon: markers_icon }).addTo(map)
.bindPopup("<b>Hello world !</b><br />I am a popup in AUST.").openPopup();
// var icon = L.Icon.Label.extend({
// options: {
// iconUrl: '1.png',
// shadowUrl: null,
// iconSize: new L.Point(0, 0),
// iconAnchor: new L.Point(0, 1),
// labelAnchor: new L.Point(-136, -3),
// wrapperAnchor: new L.Point(12, 13),
// labelClassName: 'my-label_gov'
// }
//});
//function onLocationFound(e) {
// var radius = e.accuracy / 2;
// L.marker(e.latlng, { icon: new icon() }).addTo(map)
// .bindPopup("You are within " + radius + " meters from this point").openPopup();
// L.circle(e.latlng, radius).addTo(map);
//}
//function onLocationError(e) {
// alert(e.message);
//}
//map.on('locationfound', onLocationFound);
//map.on('locationerror', onLocationError);
//map.locate({ setView: true, maxZoom: 13 });
</script>
</body>
</html>