geocoding

Google Maps API Geocode Synchronously

陌路散爱 提交于 2019-12-01 03:07:38
I was wondering if its possible to geocode something using googlemaps api synchronously so instead of waiting for a callback function to be called, it would wait for a value to be returned. Has anyone found a way to do something like this. P.S.: I'm using version 3 of the api The Geocoder calls your callback function with the value. That's the only way to do it. If it were synchronous, your script would freeze while it waited for the Geocode to process. There really isn't any reason to do it like that. What exactly are you trying to accomplish? Yes, what you are trying to achieve is possible,

Reverse- geocoding: How to determine the city closest to a (lat,lon) with BigQuery SQL?

烈酒焚心 提交于 2019-12-01 02:58:31
问题 I have a huge collection of points - and I want to determine the closest city to each point. How can I do this with BigQuery? 回答1: This is the best performing query we've worked out so far: WITH a AS ( # a table with points around the world SELECT * FROM UNNEST([ST_GEOGPOINT(-70, -33), ST_GEOGPOINT(-122,37), ST_GEOGPOINT(151,-33)]) my_point ), b AS ( # any table with cities world locations SELECT *, ST_GEOGPOINT(lon,lat) latlon_geo FROM `fh-bigquery.geocode.201806_geolite2_latlon_redux` )

Python geocode filtering by distance

折月煮酒 提交于 2019-12-01 01:57:32
I need to filter geocodes for near-ness to a location. For example, I want to filter a list of restaurant geocodes to identify those restaurants within 10 miles of my current location. Can someone point me to a function that will convert a distance into latitude & longitude deltas? For example: class GeoCode(object): """Simple class to store geocode as lat, lng attributes.""" def __init__(self, lat=0, lng=0, tag=None): self.lat = lat self.lng = lng self.tag = None def distance_to_deltas(geocode, max_distance): """Given a geocode and a distance, provides dlat, dlng such that |geocode.lat - dlat

Google places API - How to get regions of a country?

荒凉一梦 提交于 2019-12-01 00:57:50
I've looked again and again on the site for this simple question and didn't find an answer I think it is very generic need Let's say that you have two drop down lists One you want to populate with a list of countries, and once you've selected one - to populate the other with a list of it's regions. Is it even possible with Google Places API? Cheers :) Robert Dodd No, it is not possible with Places API. You have 2 options: Use Another Database There are a few free databases of country/state lists. Have a look at the following questions for some examples: List of Cities by Country https://raw

Google/Yahoo alternatives to geocoding? [closed]

孤人 提交于 2019-12-01 00:14:45
Does anyone know of a good and accurate alternative web API for geocoding an address that is not Google or Yahoo? I want to input an address/city/state/zip and have it return to me the latitude and longitude. Ideally, I would involve it via a simple HTTP GET, e.g. http://example.com/?location=123 Main St, New York, NY and it would return JSON or XML with the latitude or longitude information. Geocoder.us is nice, and it is free (or cheap, depending on how you use it) NAVTEQ Geocoder can be your option. You may want to explorer mobile options too: http://developer.android.com Check this for

Google Maps geocoding (address to GLatLng)

帅比萌擦擦* 提交于 2019-11-30 23:29:56
I am trying to draw a geodesic polyline with Google Maps JavaScript API from two address points. var polyOptions = {geodesic:true}; var polyline = new GPolyline([ new GLatLng(), new GLatLng() ], "#f36c25", 5, 0.8, polyOptions ); map.addOverlay(polyline); if (GBrowserIsCompatible()) { map.addOverlay(polyline); } Could someone tell me how can I dynamically geocode an address into GLatLng coordinates? I am a little confused after reading Google's API documentation . Daniel Vassallo You may want to check out the following example. First it tries to geocode address1 . If it succeeds, it tries to

Python geocode filtering by distance

允我心安 提交于 2019-11-30 20:30:48
问题 I need to filter geocodes for near-ness to a location. For example, I want to filter a list of restaurant geocodes to identify those restaurants within 10 miles of my current location. Can someone point me to a function that will convert a distance into latitude & longitude deltas? For example: class GeoCode(object): """Simple class to store geocode as lat, lng attributes.""" def __init__(self, lat=0, lng=0, tag=None): self.lat = lat self.lng = lng self.tag = None def distance_to_deltas

Using the google maps api for reverse geocoding lat/long from iPhone

六月ゝ 毕业季﹏ 提交于 2019-11-30 19:27:31
问题 I am currently using the google maps' reverse geocoding API to convert long/lat received from an iPhone's CoreLocation API into city/state information on a google app engine server. Would this be considered a violation of the terms? I've done some research and cannot find a direct answer to this question. Right now, we will be distributing our iPhone app for free. 回答1: According to Google's Terms of Service, you can only use the geocoder in conjunction with a Google Map. You may not: use or

Google Maps geocoding (address to GLatLng)

狂风中的少年 提交于 2019-11-30 18:57:02
问题 I am trying to draw a geodesic polyline with Google Maps JavaScript API from two address points. var polyOptions = {geodesic:true}; var polyline = new GPolyline([ new GLatLng(), new GLatLng() ], "#f36c25", 5, 0.8, polyOptions ); map.addOverlay(polyline); if (GBrowserIsCompatible()) { map.addOverlay(polyline); } Could someone tell me how can I dynamically geocode an address into GLatLng coordinates? I am a little confused after reading Google's API documentation. 回答1: You may want to check out

Google/Yahoo alternatives to geocoding? [closed]

◇◆丶佛笑我妖孽 提交于 2019-11-30 18:20:33
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Does anyone know of a good and accurate alternative web API for geocoding an address that is not Google or Yahoo? I want to input an address/city/state/zip and have it return to me the latitude and longitude. Ideally, I would involve it via a simple HTTP GET, e.g. http://example.com/?location=123 Main St, New York