Mapa

 

{source}

<center><a href=’https://www.websupport.sk/freeweb#site=freeweb&ban=8264c73c’ title=’Free hosting, domains, servers’ target=’_top’><img src=’http://provizie.websupport.sk/accounts/default1/banners2/sk/468X60freeweb_SK.png’ alt=’Sponzorovaný hosting od WebSupport.sk’ title=’Free hosting, domains, servers’ width=’468′ height=’60’ /><img style=’border:0′ src=’http://provizie.websupport.sk/scripts/imp.php?site=freeweb&ban=8264c73c’ width=’1′ height=’1′ alt=” /></a></center><br>

<!– You can place html anywhere within the source tags —>

<style> #map { height: 280px;} </style>


<link rel=”stylesheet” href=”/libraries/leaflet/leaflet.css” />
<script src=”/libraries/leaflet/leaflet.js”></script>

<script src=”/libraries/jquery.min.js”></script>

<div id=”map”></div>


<script language=”javascript” type=”text/javascript”>

// You can place JavaScript like this

var map = L.map('map').setView([48.75, 19.76], 7);
var markerLayerGroup = L.layerGroup().addTo(map);

L.tileLayer('http://tiles.freemap.sk/T/{z}/{x}/{y}', { maxZoom: 18, attribution: 'Map data &copy; <a href="http://freemap.sk">Freemap Slovakia</a> and contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>.' }).addTo(map);
do_points();

function do_points(){
var myIcon = {
iconUrl: 'http://cestasnp.sk/images/mapa/grocery.png',
iconAnchor: [14, 32],
popupAnchor: [3, -20]
};

requestURL = "https://sledovanie-cestasnp.rhcloud.com/ajax/pois/onroute?callback=?";

$.getJSON(requestURL, function(json) {

parse_json = json.data
for (var i in parse_json) {
<!-- , {icon: leafIcon} -->
var myIcon = {
iconUrl: '/images/mapa/aktivne.png',
iconAnchor: [14, 32],
popupAnchor: [3, -20]
};
var leafIcon = L.icon(myIcon);

L.marker([parse_json[i].coordinates[1], parse_json[i].coordinates[0]], {icon: leafIcon}).addTo(map).bindPopup("<b>"
+ parse_json[i].group + "</b>, <b>" + parse_json[i].date + "</br></b>"+ parse_json[i].text, {maxHeight:200});
}
});

}

</script>

<?php


    
?>
{/source}

Pridaj komentár

Vaša e-mailová adresa nebude zverejnená. Vyžadované polia sú označené *