-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path13.html
More file actions
131 lines (130 loc) · 5.3 KB
/
13.html
File metadata and controls
131 lines (130 loc) · 5.3 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Añadiendo atributos de imagen a marcadores</title>
</head>
<body>
<script src="//sitna.navarra.es/api/dev/"></script>
<div id="mapa"></div>
<script>
const myMap = new SITNA.Map("mapa", {
baseLayers: [
SITNA.Consts.layer.MAPBOX_SATELLITE,
SITNA.Consts.layer.MAPBOX_STREETS,
SITNA.Consts.layer.CARTO_LIGHT,
SITNA.Consts.layer.CARTO_DARK
],
crs: "EPSG:3857",
initialExtent: [-8916022, 3179736, 9869141, 11789603],
workLayers: [
{
id: "paises",
type: SITNA.Consts.layerType.WMS,
url: "https://bio.discomap.eea.europa.eu/arcgis/services/Internal/Basemap_EEA38_WM/MapServer/WMSServer",
layerNames: ["3"],
title: "Países del mundo"
},
{
id: "rios",
type: SITNA.Consts.layerType.VECTOR,
url: "//sitna.github.io/getting-started/data/rivers.kml",
title: "Ríos"
},
{
id: "capitales",
type: SITNA.Consts.layerType.VECTOR,
format: SITNA.Consts.mimeType.GEOJSON,
url: "//sitna.github.io/getting-started/data/capitals.json",
title: "Capitales del mundo"
}
],
controls: {
TOC: false,
workLayerManager: {
div: "tc-slot-toc"
}
}
});
myMap.loaded(() => {
myMap.addLayer({
id: "poi",
type: SITNA.Consts.layerType.VECTOR,
title: "Puntos de interés"
}, () => {
myMap.addMarker([-203288, 6652999], {
layer: "poi",
group: "Prehistoria",
data: {
"Nombre": "Stonehenge",
"Fecha de inicio de construcción": "2400-2200 a.e.c.",
"Uso": "Desconocido",
// Añadimos un atributo con nombre en un formato específico para identificarlo como imagen
"Fotografía__image_auto_200": "//sitna.github.io/getting-started/img/stonehenge.jpg"
}
});
myMap.addMarker([1390641, 5144550], {
layer: "poi",
group: "Edad Antigua",
data: {
"Nombre": "Coliseo",
"Fecha de inicio de construcción": "72 e.c.",
"Uso": "Anfiteatro",
"Fotografía__image_auto_200": "//sitna.github.io/getting-started/img/colosseum.jpg"
}
});
myMap.addMarker([677254, 6581543], {
layer: "poi",
group: "Edad Media",
data: {
"Nombre": "Catedral de Aquisgrán",
"Fecha de inicio de construcción": "796",
"Uso": "Templo",
"Fotografía__image_auto_200": "//sitna.github.io/getting-started/img/aachen.jpg"
}
});
myMap.addMarker([-399432, 4463713], {
layer: "poi",
group: "Edad Media",
data: {
"Nombre": "Alhambra",
"Fecha de inicio de construcción": "c. 1238",
"Uso": "Residencia",
"Fotografía__image_auto_200": "//sitna.github.io/getting-started/img/alhambra.jpg"
}
});
myMap.addMarker([-720856, 7112550], {
layer: "poi",
group: "Prehistoria",
data: {
"Nombre": "Newgrange",
"Fecha de inicio de construcción": "3300-2900 a.e.c.",
"Uso": "Funerario",
"Fotografía__image_auto_200": "//sitna.github.io/getting-started/img/newgrange.jpg"
}
});
myMap.addMarker([2641252, 4575413], {
layer: "poi",
group: "Edad Antigua",
data: {
"Nombre": "Partenón",
"Fecha de inicio de construcción": "447 a.e.c.",
"Uso": "Templo",
"Fotografía__image_auto_200": "//sitna.github.io/getting-started/img/parthenon.jpg"
}
});
myMap.addMarker([236074, 6241789], {
layer: "poi",
group: "Edad Moderna",
data: {
"Nombre": "Palacio de Versalles",
"Fecha de inicio de construcción": "1661",
"Uso": "Residencia",
"Fotografía__image_auto_200": "//sitna.github.io/getting-started/img/versailles.jpg"
}
});
});
});
</script>
</body>
</html>