Presentación para discurso

parent 95af827f
......@@ -7,6 +7,7 @@ var selectedTrajectory="";
var oldSelectedTrajectory="";
var trajectsOnChange=true;
var chartsOnCharge=false;
var firstCharge=true;
function generateLeafletMap(){
......@@ -34,11 +35,22 @@ function generateLeafletMap(){
//var grayscale = L.tileLayer(mbUrl, {id: 'mapbox.light', attribution: mbAttr}),
var streets = L.tileLayer(mbUrl, {id: 'mapbox.streets', attribution: mbAttr});
leafletMap = L.map('mapid',{
center: [43.309278, -2.962346],
zoom: 12,
layers: [stopPoints,trajRoute]
});
if(firstCharge){
leafletMap = L.map('mapid',{
center: [43.309278, -2.962346],
zoom: 12,
layers: [trajRoute] //stopPoints,
});
firstCharge=false;
}else{
leafletMap = L.map('mapid',{
center: [43.309278, -2.962346],
zoom: 12,
layers: [stopPoints,trajRoute]
});
}
......@@ -793,4 +805,13 @@ function showChart(){
setTimeout(function(){ $('#container')[0].style.display="inline-block"; }, 300);
}
\ No newline at end of file
function eventFire(el, etype){
if (el.fireEvent) {
el.fireEvent('on' + etype);
} else {
var evObj = document.createEvent('Events');
evObj.initEvent(etype, true, false);
el.dispatchEvent(evObj);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment