/
ceuta.html
45 lines (39 loc) · 1.48 KB
/
ceuta.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
<!DOCTYPE html>
<html>
<head>
<title>Leaflet PHP/MBTiles</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../../../javascripts/leaflet/leaflet.css" />
</head>
<body>
<div id="map" style="width: 600px; height: 400px"></div>
<p>Este ejemplo demuestra el uso de dos ficheros MbTiles</p>
<ul>
<li><strong>alacant.mbtiles</strong> (420 Mb): Procedente de la cartografía base del IGN. Niveles 10 al 15. Ámbito: provincia de Alicante</li>
<li><strong>sax_pnoa_16_20.mbtiles</strong> (185 Mb): Procedente del WMS del PNOA. Niveles 16 al 20: Ámbito: zona urbana Sax</li>
</ul>
<p>Para utilizar esta utilidad necesitas:</p>
<ul>
<li>Un servidor web (Apache), PHP y PHP-PDO</li>
<li>Descarga el script PHP-MBTiles-Server PHP desde aquí: <a href="https://github.com/bmcbride/PHP-MBTiles-Server/blob/master/mbtiles.php" target="_blank">PHP-MBTiles-Server</a> (requires PHP/PDO).</li>
</ul>
</p>
<script src="../../../javascripts/leaflet/leaflet.js"></script>
<script>
var map;
var ceuta = new L.tileLayer('./mbtiles.php?db=ceuta.mbtiles&z={z}&x={x}&y={y}', {
tms: true,
attribution: 'Tiles cortesia del <a href="http://www.ign.es" target="_blank">IGN</a>',
opacity: 0.7
});
map = new L.Map("map",{
//minZoom:10,
maxZoom:15,
zoom: 11,
center: [35.8885380012,-5.3185921685],
layers: [ceuta]
});
</script>
</body>
</html>