ulrich
2016-11-27 c656959c0f936aee7670a1ed36bdb371028f903e
commit | author | age
c65695 1 /*
U 2
3   Beispiel aus Spot fuer den Post eines Coordinates-Objektes
4
5     var coord = new Coordinates(
6                     c.latitude, 
7                     c.longitude, 
8                     self.nummer(c.altitude), 
9                     self.nummer(c.accuracy), 
10                     self.nummer(c.altitudeAccuracy), 
11                     self.nummer(c.heading), 
12                     self.nummer(c.speed));
13             var cObj = self.serialisieren(coord);
14
15
16             $.ajax({
17               url: '../rpc?c=de.uhilger.spot.api.NutzerApi&m=ortSpeichern',
18               data: {
19                 p: cObj
20               },
21               type: "POST",
22               dataType : "html",
23               //success: function( resp ) {
24                 //$('#fehler').html('Antwort: ' + resp);
25               //},
26               error: function( xhr, status, errorThrown ) {
27                 $('#fehler').html("Error: " + errorThrown + " Status: " + status);
28               },
29               complete: function( xhr, status ) {
30                 //alert( "The request is complete!" );
31               }
32             });      
33             usw.
34
35  
36   function Coordinates(la, lo, al, ac, aa, hd, sp) {
37    this.latitude = la;
38    this.longitude = lo;
39    this.altitude = al;
40    this.accuracy = ac;
41    this.altitudeAccuracy = aa;
42    this.heading = hd;
43    this.speed = sp;
44 }
45  
46  
47  
48  
49  */