1 function recup_data (url,id,method)
4 j.getJSON(url, function(data)
6 j.each(data , function(key, val)
8 switch ( val.params.data.print_method )
29 alert ("unknown method");
32 for ( var i= 0; i<val.params.data.message.length;i++)
35 switch ( val.params.data.print_method )
38 pos_marker[id].push( new google.maps.LatLng(val.params.data.message[i].ape_position[0].latitude,val.params.data.message[i].ape_position[0].longitude));
42 position: pos_marker[id][pos_marker[id].length - 1],
45 //title : val.params.data.message.ape_timestamp
48 //marker[id].push( new google.maps.Marker(opt_marker[id][opt_marker[id].length - 1 ]));
49 if ( val.params.data.print_options )
51 opt_conf[id] = val.params.data.print_options;
57 for ( var j = 0 ; j < val.params.data.message[i].ape_position.length ; j++ )
59 pos_line[id].push(new google.maps.LatLng(val.params.data.message[i].ape_position[j].latitude,val.params.data.message[i].ape_position[j].longitude)) ;
66 strokeColor: "#FF0000",
71 if ( val.params.data.print_options )
73 opt_conf[id] = val.params.data.print_options;
80 longueur = pos_circle[id].length;
81 pos_circle[id][longueur]= [];
82 pos_circle[id][longueur].push( new google.maps.LatLng(val.params.data.message[i].ape_position[0].latitude,val.params.data.message[i].ape_position[0].longitude));
83 var l_radius=get_Radius(val.params.data.message[i], val.params.data.print_options);
86 center : pos_circle[id][longueur][0],
89 if ( val.params.data.print_options )
91 opt_conf[id] = val.params.data.print_options;
104 afficher_par_id(id,method);
110 function set_options(id) {
116 for ( var i = 0; i < marker[id].length ; i++ )
119 if ( opt_conf[id].icon ) // color need to be in english
121 marker[id][i].setIcon("http://labs.google.com/ridefinder/images/mm_20_"+opt_conf[id].icon+".png");
138 { alert ( "set_options : mauvais id" );}
144 function get_Radius(message,print_options){
150 console.log(print_options.circle_radius_arg+"--"+message.date_created);
151 console.log(eval('message.'+print_options.circle_radius_arg));
152 data = eval('message.'+print_options.circle_radius_arg);
153 if (data < print_options.size.tiny){return tiny;}
154 else if(data < print_options.size.small){return small;}
155 else if(data < print_options.size.avg){return avg;}
156 else if(data < print_options.size.big){return big;}