-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFoto2.html
41 lines (39 loc) · 1.77 KB
/
Foto2.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
<!DOCTYPE html>
<html lang="de">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<title>Fotoanzeige V2</title>
</head>
<body>
<h1>Fotoanzeige V2</h1>
<div id="map" class="gpxview:Beispiel1.gpx:Satellit" style="float:left;width:55%;height:500px"><noscript><p>Zum Anzeigen der Karte wird Javascript benötigt.</p></noscript></div>
<div style="display:inline-block;margin-left:5%;margin-top:1em;width:35%"><img id="Bild"><br><span id="Text"></span></div>
<p style="clear:both;margin-top:0.5em"><a href="https://www.j-berkemeier.de/GPXViewer/">GPX-Viewer</a></p>
<script src="GM_Utils/GPX2GM.js"></script>
<script>
let marker = null;
const mapele = document.getElementById("map");
mapele.addEventListener("click_Marker_Bild",function(event) {
const text = event.detail.events.eventparameter.text;
const lat = event.detail.events.eventparameter.coord.lat;
const lon = event.detail.events.eventparameter.coord.lon;
const src = event.detail.events.eventparameter.src;
const parameters = event.detail.parameters;
const map = event.detail.Map;
if(marker) JB.RemoveElement(marker);
document.getElementById("Bild").src = src;
document.getElementById("Text").innerHTML = text;
if(JB.GPX2GM.parameters.mapapi=="gm") marker = map.Marker({ lat:lat, lon:lon },
{ icon: { anchor: { x: 0, y: 3 },
rotation: 60, scale: 5,
path: google.maps.SymbolPath.BACKWARD_CLOSED_ARROW,
strokeColor: "red", fillColor: "red", fillOpacity:1
}
} ) [0];
else marker = map.Marker({lat:lat,lon:lon},JB.icons.Kreis)[0];
event.preventDefault();
});
</script>
</body>
</html>