1 function ape_initialize(){
2 client = new APE.Controller();
12 APE.Controller = new Class({
18 initialize: function(options){
19 var j = jQuery.noConflict();
20 this.setOptions(options);
21 this.addEvent('load',this.start);
22 this.onRaw('postmsg', this.onMsg);
23 this.addEvent('ape_join',this.ape_join);
24 this.addEvent('ape_leave',this.ape_leave);
25 this.addEvent('ape_quit',this.ape_quit);
26 this.addEvent('multiPipeCreate', function( pipe,options) {
27 console.log(pipe.getPubid());
28 console.log(options.pipe.properties.name);
29 var myCookie = Cookie.write(options.pipe.properties.name,pipe.getPubid());
33 start: function(core){
34 this.core.start({'name': $time().toString()});
41 ape_join: function(channel_id){
42 // il faut aussi initialier le tableau du canal
44 this.core.join(channel_id);
47 ape_leave: function(channel_id){
48 var myCookie = Cookie.read(channel_id);
49 this.core.left(myCookie);
50 Cookie.dispose(channel_id);
60 console.log(raw.data.message);
61 console.log(raw.data.message['ape_position']);
62 console.log(raw.data.message[0].ape_position[0].latitude);**/
63 recup_direct(raw,channel_id,"dynamic")
64 /**switch(raw.data.print_method)
67 j("#test").append("line");
71 j("#test").append("circle");
72 //g_map_printCircle(data.item[i]);
75 j("#test").append("marker");
76 g_map_printMarker(raw);