I posted the required screenshots and waiting for your reply
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/
I posted the required screenshots and waiting for your reply
Can you share the app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a?
Hi,
You attempt to make a request using the opportunities of working with Mongo spatial data. You request geographic locations that are located in a certain neighborhood of a given point. Unfortunately, we do not support MongoDB's geospatial features.
We can offer a solution for distances up to 300 miles that is used in aviation. Here is the JS code:codefunction distance(from_lat, from_long, to_lat, to_long) {
return Math.sqrt(
Math.pow( (111.13209-0.56605 * Math.cos( 2 * ( from_lat + to_lat )/2/180Math.PI )
+ 0.00120 * Math.cos( 4 * ( from_lat + to_lat )/2/180Math.PI )
) * ( from_lat - to_lat ), 2 )
+ Math.pow( (111.41513 * Math.cos( ( from_lat + to_lat )/2/180Math.PI )
- 0.09455 * Math.cos( 3 * ( from_lat + to_lat )/2/180Math.PI )
+ 0.00012 * Math.cos( 5 * ( from_lat + to_lat )/2/180*Math.PI )
) * (from_long - to_long), 2 )
)/1.60933966531
}
console.log(distance(40.45029, -80.026184, 40.503764, -79.858034) + " -- " + "9.60");
console.log(distance(40.45029, -80.026184, 41.678638, -83.479484) + " -- " + "199.26");
console.log(distance(40.45029, -80.026184, 41.493026, -81.674572) + " -- " + "112.29");
console.log(distance(40.45029, -80.026184, 39.793372, -83.681536) + " -- " + "198.83(198.82)");
/code
There may be a slight deviation somewhere in hundredths on separate checks.
I have done it.. Can you help me in fixing it ASAP ?
Please find our suggestion below.