geolocation

Get zip code based on lat & long?

浪尽此生 提交于 2019-11-30 09:22:39
Is there a service or API I can ping, and pass in the lat/long as parameters, where it returns the zip code that lat/long pair is within? This is US-only, so I don't have to worry about international codes, etc. I feel like Google Maps' reverse-geocoding is too heavy for me. I'd prefer something lighter, if possible. This will be done in javascript. Michał Powaga It is called Reverse Geocoding (Address Lookup) . To get address for lat: 40.714224, lng: -73.961452 query http://maps.googleapis.com/maps/api/geocode/json with parameters latlng=40.714224,-73.961452&sensor=true ( example ) and it

Free web service to determine IP address zip code [closed]

心已入冬 提交于 2019-11-30 09:13:17
Does anyone know of a free web service to determine the zip code of an IP address? MaxMind GeoLite City http://www.maxmind.com/app/geolitecity I realize this question is old, but this may still help other people. I found a free / open source (so you can even run your own instance and not be subject to their hourly limit of 10,000 requests) IP geolocation database: http://freegeoip.net/ I don't know of any that will return a zipcode, but this one is free and returns city/state http://www.hostip.info/ http://tuq.in/tools/geo is a free geolocation service also it is way awsome in quality 来源:

Add more than 20 regions to geofencing ios

老子叫甜甜 提交于 2019-11-30 08:50:23
问题 I want to add 100 of regions to geofencing.(apple limit it to 20)any one have better idea for it.please help me. currently im using significant location change.when significant location change, - (void) locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation method i call API with current location and get the nearest region set and add into geofencing.This method works.But i heard from web significant location change

Mongodb : Check if a point is inside a stored polygon

筅森魡賤 提交于 2019-11-30 08:17:17
I'm new to the mongodb geolocation features. I stored some polygons that represent the country borders in a database along with the country name. Now what i would like to do is checking which country a point is in. For example if i give my own geolocation i would like to get the country where i am. Is there a way to do it with mongodb? Maybe with geoWithin? Thank you You must store your location data like this schema: {"loc": {"coordinates":[ [ [1.0,1.0], [1.0,10.0], [10.0,10.0], [10.0,1.0], [1.0,1.0] ] ], "type":"Polygon" } } and then send $geoIntersects queries db.polygons.find({"loc":{"

MongoDb near/geonear query with variable distance

心已入冬 提交于 2019-11-30 07:47:15
I would like to execute a query where the distance is a dynamic field from the collection. Example of entries in the collection: { name:'myName', location: {lat:10, lng:20}, maximumDistance: 10 } { name:'myName2', location: {lat:20, lng:20}, maximumDistance: 100 } My goal is to retrieve all the elements from this collection where this location is close to a given location, let's say (10,10) but where the calculated distance is less than this maximumDistance field. I can set maxDistance to a constant value (high enough to retrieve all the elements I want) in the near query and then do the

Mysql spatial distance using POINT - Not working

寵の児 提交于 2019-11-30 07:44:57
My goal is to use mysql POINT(lat,long) to find nearby entities in the database. I'm trying to do something like in the bottom of this tutorial http://www.scribd.com/doc/2569355/Geo-Distance-Search-with-MySQL . Here is what I have got: Table: CREATE TABLE mark ( id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(20) DEFAULT NULL, loc POINT NOT NULL, SPATIAL KEY loc (loc) ) ENGINE=MyISAM; Inserting some test-data: INSERT INTO mark (loc,name) VALUES (POINT(59.388433,10.415039), 'Somewhere 1'); INSERT INTO mark (loc,name) VALUES (POINT(63.41972,10.39856), 'Somewhere 2'); Declaring

How to prevent double prompt for geolocation in Phonegap app?

安稳与你 提交于 2019-11-30 07:28:05
I created a PhoneGap app for iPhone that uses geolocation via JavaScript inside webview. When I run the app the first time, it'll prompt me to allow geolocation for this app. When I hit "ok", it'll prompt me again with the same question but this time it states that "index.html" wants permission to use geolocation. That makes sense because iOS probably wants permission to allow geolocation for the app itself for the first time and the 2nd time the browser wants permission. However, since doesn't lead to a great user experience: How can I prevent this double prompt? (I'd be enough if the 2nd

java io ioexception unable to parse response from server geocoder

妖精的绣舞 提交于 2019-11-30 07:10:35
问题 I am using this code to get geographical addresses: private String getAddress(Location location) { try{ List<Address> addresses = new Geocoder(this,Locale.getDefault()).getFromLocation(location.getLatitude(), location.getLongitude(), 1); if(addresses!=null) { String address="Address not available"; for(int i=0;i<addresses.size();i++) { Address addre=addresses.get(i); String street=addre.getAddressLine(0); if(null==street) street=""; String city=addre.getLocality(); if(city==null) city="";

How to get Location (latitude & longitude value) in variable on iOS?

你说的曾经没有我的故事 提交于 2019-11-30 06:56:42
问题 I would like to use the location of my app user, more specifically the latitude and longitude value. I need them to use in a variable, so that I can send them with an url... I never worked before withe locations on iOS and Xcode and found nothing matching for my problem on the Internet... So I hope someone can explain it to my with a code sample :) Thx for u help Laurenz from Germany 回答1: You can use CoreLocation to get the longitude and latitude. Include framework: Click your project in

Why HTML5 Geolocation?

亡梦爱人 提交于 2019-11-30 06:51:00
Why does HTML5 geolocation let you share your location? What is main purpose of using geolocation, as you can get the location with IP address as well. Is there any difference between these two methods? I'm asking because geolocation requires the user's permission and also doesn't work on all browsers. HTML5 GeoLocation tends to be much more accurate than IP-based GeoLocation. IP-based GeoLocation depends on databases associated with ISPs to figure out where you are. This doesn't work well when your ISP services a very large area and gives out dynamic IP addresses. The address in one town