Hi I am following your Geospatial Queries example to create a function. I have created the database service with a where request parameter. I test the following code and it executes successfully:
{ "Location" : { "$nearSphere" : [39.077309,-77.398537], "$maxDistanceInMiles" : 100 } }
I want to replace the hardcoded Latitude and Longitude coordinates with a locally stored geolocation latitude and longitude. I have successfully stored and called the lat and lon in another portion of the program but can't seem to do the same for the database service request. In mapping with the where parameter I use the following javascript: var jsonback = { "Location" :{"$nearSphere" : [return localStorage.getItem('lat') + ',' + localStorage.getItem('log')], "$maxDistanceInMiles" : 100}
};
return jsonback;
But it doesn't work, do you have any suggestions?