X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fpres_view%2Fpres_view_map%2Fafficher_par_id.js;fp=plugins%2Fpres_view%2Fpres_view_map%2Fafficher_par_id.js;h=0000000000000000000000000000000000000000;hb=9c3ecdab818e1792e6d781df95098b30543ff69f;hp=013d4e42276d2145877e17f8f8b2710d10ee91da;hpb=ce6c1a9a8a96bedd463e6aa3384f588cd2d6d456;p=unfold.git diff --git a/plugins/pres_view/pres_view_map/afficher_par_id.js b/plugins/pres_view/pres_view_map/afficher_par_id.js deleted file mode 100644 index 013d4e42..00000000 --- a/plugins/pres_view/pres_view_map/afficher_par_id.js +++ /dev/null @@ -1,112 +0,0 @@ -/* - - Gére les affichages static, dynamiques ( le static est utiliser pour afficher un marker a la fois ) - sinon affiche une erreur - -*/ - -var animation = []; -var temps ; -var toto = 0; -var save_long ; -function afficher_par_id (id,method) -{ - toto = 0 ; - animation[id] = []; - switch ( method ) - { - case 'static': - switch ( ref[id] ) - { - case 'marker' : - for ( var i = 0; i < opt_marker[id].length ; i++ ) - { - marker[id][i] = new google.maps.Marker(opt_marker[id][i]); - marker[id][i].setVisible ( true ); - } - break; - - case 'line' : - for ( var i = 0; i < opt_line[id].length ; i++ ) - { - line[id][i] = new google.maps.Polyline(opt_line[id][i]); - line[id][i].setVisible ( true ); - } - break; - case 'circle' : - for ( var i = 0; i < opt_circle[id].length ; i++ ) - { - circle[id][i] = new google.maps.Circle(opt_circle[id][i]); - circle[id][i].setVisible ( true ); - } - break; - default : - { alert ( " mauvaise referance" ); } - break; - } - - break; - - case 'animation': - document.getElementById("statusbar").innerHTML = "ANIMATION EN COURS " ; - switch ( ref[id] ) - { - case 'marker': - save_long = opt_marker[id].length; - - for ( var i = 0; i < opt_marker[id].length ; i++ ) - { - temps =(10.5 - j( "#interval_animation" ).slider( "option", "value" )) * 1000 *(i+1) ; - animation [id][i] = setTimeout ( function() - { - marker[id][toto] = new google.maps.Marker(opt_marker[id][toto]); - marker[id][toto].setVisible ( true ); - map.panTo ( pos_marker[id][toto]); - toto++; - if ( toto == save_long) document.getElementById("statusbar").innerHTML = "ANIMATION TERMINEE " ; - }, temps ); - } - break; - case 'line' : - save_long = opt_line[id].length; - for ( var i = 0; i < opt_line[id].length ; i++ ) - { - temps =(10.5 - j( "#interval_animation" ).slider( "option", "value" )) * 1000 *(i+1) ; - animation [id][i] = setTimeout ( function() - { - - line[id][toto] = new google.maps.Polyline(opt_line[id][toto]); - line[id][toto].setVisible ( true ); - map.panTo ( pos_line[id][toto][0]); - toto++; - if ( toto == save_long) document.getElementById("statusbar").innerHTML = "ANIMATION TERMINEE " ; - }, temps ); - } - break; - case 'circle' : - save_long = opt_circle[id].length; - for ( var i = 0; i < opt_circle[id].length ; i++ ) - { - temps =(10.5 - j( "#interval_animation" ).slider( "option", "value" )) * 1000 *(i+1) ; - setTimeout ( function() - { - - circke[id][toto] = new google.maps.Circle(opt_circle[id][toto]); - circle[id][toto].setVisible ( true ); - map.panTo ( pos_circle[id][toto][0]); - toto++; - if ( toto == save_long) document.getElementById("statusbar").innerHTML = "ANIMATION TERMINEE " ; - }, temps ); - } - default : - {} - break; - } - ; - break ; - - default: - alert ( "afficher_par_id : Erreur dans la method" ); - break; - } -}