Google places Rankby Distance
Cristian,
Please give us your app public link and describe steps to reproduce this problem in your app.
Regards.
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Cristian,
Please give us your app public link and describe steps to reproduce this problem in your app.
Regards.
on near search page im trying to first get current position using geolocation,
storing the position to local variable (current_long ,current_lat).Then when page loads i plot the current position on map.
using slider I then try to find nearest geopoints from db/addresses/
then I would like to plot the nearest locations on the map where my current position is located...
Cristian,
Please specify steps to reproduce the problem. Step-by-step where we need to click to reach goal page.
Regards.
1 press any flag
2 click "hitta närmaste kyrka"
3.click on button "hitta närmaste kyrka"
when clicked the console gets that error...
then i want the markers of the nearest locations to appear on the map
Cristian,
Please use following JS code:
pre
var currentlat = parseFloat(localStorage.getItem("current_lat"));
var currentlong = parseFloat(localStorage.getItem("current_long"));
var slider_value = parseInt(localStorage.getItem("slider_value"));
var whereObject = {
"location" : {
"$nearSphere" : [currentlong, currentlat],
"$maxDistanceInKilometers" : slider_value
}
};
console.log("Where object is:");
console.log(whereObject);
return JSON.stringify(whereObject);
/pre
Regards.
ok ill try it
ok getting closer this gives me only the nearest church ,the error is gone now.
Do i connect the array to the marker on success in order to get the markers within the search radius?
This search should find the nearest within the radius right?
cant believe it,same error has resurfaced without me doing anything on that page