geolocation

Working with Geolocation and Google Maps API [HELP]

风流意气都作罢 提交于 2019-12-24 17:59:12
问题 I'm new to the mobile development world and right now I'm building an app that uses jQuery mobile and PhoneGap. Here's my logic: I have a table that contains the users and their addresses. I grab the user address and pass it trough the maps API to catch the location. But I'm doing this for every single record and sometimes the API breaks because the number of simultaneous requests. How can I know what users are closest to me without running it through the maps API? Thanks a lot! 回答1: Rafael,

Working with Geolocation and Google Maps API [HELP]

送分小仙女□ 提交于 2019-12-24 17:59:10
问题 I'm new to the mobile development world and right now I'm building an app that uses jQuery mobile and PhoneGap. Here's my logic: I have a table that contains the users and their addresses. I grab the user address and pass it trough the maps API to catch the location. But I'm doing this for every single record and sometimes the API breaks because the number of simultaneous requests. How can I know what users are closest to me without running it through the maps API? Thanks a lot! 回答1: Rafael,

What are good ways to get all zipcodes/postal codes within a city?

99封情书 提交于 2019-12-24 17:53:23
问题 Now I know using Geocomplete I can get city,state postal codes and lot other info.How can I get all postal codes / zipcodes within a city.Like this one I found here.Can I get it from geocomplete or should I query it from a geoip database like Maxmind? 回答1: i work here boundaries-io.com I think this is what you need it uses US Census as repository: US Zipcode Boundaries API: https://www.mashape.com/vanitysoft/boundaries-io Above API shows US Boundaries(GeoJson) by zipcode,city, and state. you

How to let users choose their town, so my app can know coordinates

萝らか妹 提交于 2019-12-24 17:06:17
问题 I am starting my first Open Source ASP.NET project in C#. Data that Web app is going to show is in close relation with geographic coordinates of towns. Now I want to implement user interface where user of web app can choose a desired town and submit form, and behind scene i want to get coordinates of chosen town, so I can make calculations. Now I wondering is there some free services or library, which can I implement to get wanted results? Does Google's Maps provide this feature or there is

How to let users choose their town, so my app can know coordinates

浪子不回头ぞ 提交于 2019-12-24 17:04:46
问题 I am starting my first Open Source ASP.NET project in C#. Data that Web app is going to show is in close relation with geographic coordinates of towns. Now I want to implement user interface where user of web app can choose a desired town and submit form, and behind scene i want to get coordinates of chosen town, so I can make calculations. Now I wondering is there some free services or library, which can I implement to get wanted results? Does Google's Maps provide this feature or there is

Can't return / get access to a variable inside a function

落花浮王杯 提交于 2019-12-24 16:43:24
问题 I have the following lines of code. Everything works except for setting the variable "UserLocation" and printing it to the console. My goal is to get the coordinates I find in the showPosition() function as a global variable that can be accessed anywhere, because I will be using them a lot and for many purposes. What am I missing here? I've tried setting the coordinates variable inside showPosition to a global variable, tried returning the variable, etc. The only way I can get those

generate random locations nearby my location

五迷三道 提交于 2019-12-24 15:38:18
问题 I would like to generate random latitude/longitude pairs inside the circle surrounding my location. Currently i have implemented a location listener and everytime i get a new location i would like to draw random locations nearby me. I am able to compute distance between 2 already existing locations and know if its inside my range: public List<Location> filter(Location current, List<Location> locations, int radius) { List<Location> results = new ArrayList<Location>(); for (Location loc :

Flutter Firestore Geo query

旧时模样 提交于 2019-12-24 15:06:26
问题 WHAT I HAVE TO DO: I'm building an application where I want to do a query in firebase and receive the users who are in a range of X kilometers. But I want to limit this received documents and also to have a function for getting more documents on the scroll. I'm using a StreamBuilder->ListView.build in order to build my list. When I'm going to receive the end of the scrollable list I want to get more documents from Firestore (if I have any). WHAT I'VE DONE ALREADY: So far I found just 2

Find location 1 Km away in 180 degree (South) from my location

青春壹個敷衍的年華 提交于 2019-12-24 14:30:41
问题 I have one Location (lat and long) and I want to find the next location(lat and long), which is 1 km away in 180 degree (in south) from my location(lat and long). Can you give me and algorithm or function? 回答1: Start with the Rosetta code implementation in Java: public static double haversine(double lat1, double lon1, double lat2, double lon2) { double dLat = Math.toRadians(lat2 - lat1); double dLon = Math.toRadians(lon2 - lon1); lat1 = Math.toRadians(lat1); lat2 = Math.toRadians(lat2);

Geolocation not working with Phonegap Build after adding config.xml

隐身守侯 提交于 2019-12-24 14:29:44
问题 I have coded a small geolocation application using HTML and Javascript. I am using Phonegap to build it. Geolocation worked fine until adding the config.xml file. I have added all the correct permissions for Phonegap (3.1.0). Here's the relevant bits of code: <!-- Enable individual API permissions here. The "device" permission is required for the 'deviceready' event. --> <feature name="http://api.phonegap.com/1.0/device" /> <feature name="http://api.phonegap.com/1.0/geolocation"/> <preference