Hat jemand evtl. ein Openstreetmap Attribut Template für den CC erstellt, mit GPX Daten, das er zu Verfügung stellen kann?
Ich habe zwar ein rudimentäres Template erstellen können, aber bekomme die GPX-Datei nicht angezeigt.
Ich habe zwar ein rudimentäres Template erstellen können, aber bekomme die GPX-Datei nicht angezeigt.
<?php echo $this->longitude; ?>
<?php echo $this->latitude; ?>
<script>
<?php
$GLOBALS['TL_JAVASCRIPT'][] = \Config::get('uploadPath').'/cto_layout/scripts/leaflet/leaflet.js|static';
$GLOBALS['TL_CSS'][] = \Config::get('uploadPath').'/cto_layout/scripts/leaflet/leaflet.css|static';
?>
</script>
<script type="text/javascript" src="https://stamen-maps.a.ssl.fastly.net/js/tile.stamen.js"></script>
<div class="ce_leaflet_map_inside" id="gmap_<?php echo $this->id; ?>" style="height: 400px; width: 100%;"></div>
<script>
/* <![CDATA[ */
/**
* Initialize the map
*/
var latitude = <?php echo $this->latitude; ?>;
var longitude = <?php echo $this->longitude; ?>;
var layer = new L.StamenTileLayer("terrain");
var map = new L.Map("gmap_<?php echo $this->id; ?>", {
center: new L.LatLng(latitude, longitude),
zoom: 9,
});
map.addLayer(layer);
var gpx = '/files/test.gpx'; // URL to your GPX file or the GPX itself
new L.GPX(gpx, {async: true}).on('loaded', function(e) {
map.fitBounds(e.target.getBounds());
}).addTo(map);
</script>
<?php echo $this->latitude; ?>
<script>
<?php
$GLOBALS['TL_JAVASCRIPT'][] = \Config::get('uploadPath').'/cto_layout/scripts/leaflet/leaflet.js|static';
$GLOBALS['TL_CSS'][] = \Config::get('uploadPath').'/cto_layout/scripts/leaflet/leaflet.css|static';
?>
</script>
<script type="text/javascript" src="https://stamen-maps.a.ssl.fastly.net/js/tile.stamen.js"></script>
<div class="ce_leaflet_map_inside" id="gmap_<?php echo $this->id; ?>" style="height: 400px; width: 100%;"></div>
<script>
/* <![CDATA[ */
/**
* Initialize the map
*/
var latitude = <?php echo $this->latitude; ?>;
var longitude = <?php echo $this->longitude; ?>;
var layer = new L.StamenTileLayer("terrain");
var map = new L.Map("gmap_<?php echo $this->id; ?>", {
center: new L.LatLng(latitude, longitude),
zoom: 9,
});
map.addLayer(layer);
var gpx = '/files/test.gpx'; // URL to your GPX file or the GPX itself
new L.GPX(gpx, {async: true}).on('loaded', function(e) {
map.fitBounds(e.target.getBounds());
}).addTo(map);
</script>
Kommentar