-
Notifications
You must be signed in to change notification settings - Fork 0
/
leaflet-calles.html
89 lines (67 loc) · 2.57 KB
/
leaflet-calles.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
<html lang="es">
<head>
<title>Calles</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="autor" />
<meta name="description" content="descripción página">
<meta name="robots" content="index,follow">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<link rel="stylesheet" href="https://unpkg.com/[email protected]/assets/css/leaflet.css" />
<script>
L_PREFER_CANVAS = true;
</script>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://unpkg.com/[email protected]/dist/bundle.min.js"></script>
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
}
#map {
height: 100%;
width: 100%;
}
.leaflet-control-geosearch .results > * {
cursor: pointer
}
</style>
<script>
var map, osm, esri;
var geojson, farmacias;
var controlCapas;
var controlEscala;
function Init() {
map = L.map('map', {
center: [41.3954, 2.16859],
zoom: 14
});
esri = L.tileLayer(
'http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
maxZoom: 17,
minZoom: 1,
attribution: 'Tiles © Esri',
}).addTo(map);
osm = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
minZoom: 1,
attribution: 'OSM'
});
var baseMaps = {
"Orto_esri": esri,
"Mapa_osm": osm
};
controlCapas = L.control.layers(baseMaps, null);
controlCapas.addTo(map);
new GeoSearch.GeoSearchControl({
// provider: new GeoSearch.OpenStreetMapProvider()
provider: new GeoSearch.EsriProvider()
}).addTo(map);
};
</script>
</head>
<body onload="Init()">
<div id="map"></div>
</body>
</html>