Get Geopoints from parse.com javascript -


i have succesfuly stored geopoints in parse.com , in page want console log them can place them variables , put 1 marker in google map. i'm trying code them sure miss thing , need advice.

    parse.initialize("appid", "jskey");     var photoobject = parse.object.extend('magazia');     var photoobject = new photoobject();     var query = new parse.query(photoobject);     query.select('latlon');     query.find({         success: function(locationlist) {             alert("successfully retrieved " + locationlist.length + " locations.");             (var = 0; < locationlist.length; i++) {                 var locationsblock = {};                 locationsblock = json.parse(json.stringify(locationlist[i]));                 var location = {};                 location = json.parse(json.stringify(locationsblock.geolocation));                 alert(location.latitude);             };         },         error: function(error) {             alert("error: " + error.code + " " + error.message);         }     }); 

so have class called "magazia" , inside class there column called "latlon" , geopoint. content of column example 48.29124, 28.52015 float number. alert shows me correct number of rows there in "magazia" class.

does knows why dont results code above? in advance.

ok stupid mistake

 var photoobject = parse.object.extend('magazia');     var photoobject = new photoobject();     var query = new parse.query(photoobject);     query.select('latlon');     query.find({         success: function(locationlist) {             console.log("successfully retrieved " + locationlist.length + " locations.");             (var = 0; < locationlist.length; i++) {                 var locationsblock = {};                 locationsblock = json.parse(json.stringify(locationlist[1]));                 var location = {};                 location = json.parse(json.stringify(locationsblock.latlon));                  var lat = location.latitude;                 var lon = location.longitude;                 console.log(lat, lon);             };         },         error: function(error) {             alert("error: " + error.code + " " + error.message);         }     }); 

instead of locationsblock.geolocation there should locationsblock.latlon


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -