google-geocoder

Autocomplete Google Map V3 Places impossible to customize?

故事扮演 提交于 2019-11-30 04:02:21
问题 I narrowed autocomplete to a region and to a bounds that cover only Australia, but I am still receving autocomplete with Chile and China and other country out of the selected area. Does anyone have a good solution to work this problem? I also can't change the styling off Google autocomplete, it is a self generated Div with style tag that overcomes my style to autocomplete DIV? I started to use Geocoder and Jquery autocomplete to filter the results but it doesn't work as well as Google

Does the v3 Google Maps Geocoding API have a field that represents accuracy?

强颜欢笑 提交于 2019-11-30 03:58:52
I have some code that I'm porting over from API v2 to v3. In the old code we had an accuracy field that came back in the xml (not sure of the name, but it did represent a confidence level of sorts). In the new API, I don't see any field like that. If I put "Oregon, USA" into the search field I get 5 matches. The first 2 are "Oregon, USA" and "Oregon, OH, USA". They both have "partial_match" = false. This doesn't seem right, one seems partial and one doesn't. Plus, they're both coming back with the same "location_type" (APPROXIMATE). In fact, all matches are showing as not-partial and have same

Geocoder.getFromLocation grpc failed on Android real device

南楼画角 提交于 2019-11-30 03:23:51
问题 I need to get the city and state from latitude and longitude. Geocoder does this function to get the city and state. But I am getting an error java.io.IOException: grpc failed in below line only on Android real device . It is working fine in emulators . new Geocoder(context).getFromLocation(latLng.latitude, latLng.longitude, 1).get(0); Also I have been calling this function using Asynctask which is suggested in another post Geocoder grpc failed in stack overflow but nothing works for me. And

How to get address of a location from latitude longitude values using geocoder in android?

耗尽温柔 提交于 2019-11-29 12:30:39
i am tried up with some common set of codes, to get convert the lat long values into address. But i am unable to get that in all the time.. which would be the best option for this. I need this service should be constant. because i need to deliver this to a client. suggest me a good solution? Should i have to buy a service from google or yahoo? Those peoples are providing separate service for this. My main question is should this "geocoder" will be ok or not?? My code is void getAddress(){ try{ Geocoder gcd = new Geocoder(this, Locale.getDefault()); List<Address> addresses = gcd.getFromLocation

Google maps geocode API V3 not returning result in javascript function

自古美人都是妖i 提交于 2019-11-29 07:35:21
I'm trying to use the Google geocoder API V3 to plot a location on a map based on an address specified by the user, code is below. When I make a request directly (e.g. to http://maps.googleapis.com/maps/api/geocode/json?address=peterborough&sensor=false ) I get the expected response. However, when I make the same request using the code below, the midpoint variable is always undefined after the getLatLong function has exited. What am I doing incorrectly? function loadFromSearch(address) { midpoint = getLatLong(address); mapCentre = midpoint; map.setMapTypeId(google.maps.MapTypeId.ROADMAP); ...

How can I extrapolate farther along a road?

若如初见. 提交于 2019-11-29 07:35:15
Given realtime location data of a moving device over a short period of time, how can I get a lat/long pair further along this road, say, 2 miles, or even better, 5 minutes worth of driving? I see that I can use Google's Roads API to snap to a road given a lat/long pair https://developers.google.com/maps/documentation/roads/snap , but that only gets me part way there. This will be in an Android app. Given a route represented as a List<LatLng> , this function calculates the point on the route that results from travelling distance meters from origin on that route (using the Google Maps API

Does the v3 Google Maps Geocoding API have a field that represents accuracy?

百般思念 提交于 2019-11-29 01:36:36
问题 I have some code that I'm porting over from API v2 to v3. In the old code we had an accuracy field that came back in the xml (not sure of the name, but it did represent a confidence level of sorts). In the new API, I don't see any field like that. If I put "Oregon, USA" into the search field I get 5 matches. The first 2 are "Oregon, USA" and "Oregon, OH, USA". They both have "partial_match" = false. This doesn't seem right, one seems partial and one doesn't. Plus, they're both coming back

Google Maps API v3 - Geocoder results issue with bounds

喜欢而已 提交于 2019-11-28 18:26:42
Goal : I want to have a custom search (geocode) function and be able to list and click each result and display it on the map. Wanted : Adjust map bounds / zoom level accordingly, i.e. searching for "MA, USA" should zoom the map to let me see the whole Massachusetts state, while searching for "Boston, MA, USA" should zoom on the Boston area. When listing multiple results, the same should apply when clicking on a result. Issue : I can use the geometry.bounds object with fitBounds - but - some results you get using the geocoder do not have that geometry.bounds object. A quick example: searching

Terms and Conditions Google Maps: Can I store lat/lng and address components?

▼魔方 西西 提交于 2019-11-28 18:22:33
This question has been asked in a few places on SO, but I've found the answers to be either slightly contradictory or "thin"... so I'm not sure if asking again will help but here goes. The google "help" page says that the google team maintains a "presence" on SO, so if you are a google chap, please could you make this clear, and if you are not please also make this clear, thank you :) So, what I want to do... User searches for a set of locations. These will be used to form a travel itinerary. I want to take the lat/lng and the address components and store them in my own database so that when

get driving distance between two longitude latitude points

风格不统一 提交于 2019-11-28 14:44:59
I am trying to get driving distance between two longitude latitude points on rails, geocoder or any other efficient way.. Is there? geocodezip The Google Maps API v3 documentation specifies that either the origin or the destination (or waypoints) can be either an address or a google.maps.LatLng . To get the driving distance between two longitude/latitude points, pass them in the request as google.maps.LatLng objects. related question: total distance and time for all waypoints in google maps v3 proof of concept fiddle code snippet (based off the example in the documentation ): function initMap(