google-places-api

How to enable CORS for Google Places API

余生颓废 提交于 2019-12-10 02:34:44
问题 I have tried everything possible to make my app work without the need for the "Enable CORS extension for Chrome". I followed the steps on Google's official website which talks of authtokens, tried using every different key, but nothing works. I get the following error: XMLHttpRequest cannot load https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=MyKey&location=33.854546,-84.35870369999999&types=restaurant&rankby=distance. No 'Access-Control-Allow-Origin' header is present on the

Is the Map Api Key and Google Places Api the same?

谁说胖子不能爱 提交于 2019-12-10 01:59:15
问题 I hope I don't get a down vote, English is not my first language that is why I get confused by api documentations. I am confused if I need to generate different api keys for "Google Maps Android API" and "Google Places API for Android" I am asking because I am sucessfully rendering maps from my android app using google maps android api but when I try the using the code of the official google android places api example (PLACE PICKER) it is failing without throwing any errors. It renders the

how to create google autocomplete in bootstrap modal in angular 2+?

帅比萌擦擦* 提交于 2019-12-10 01:34:56
问题 I am using angular google maps (agm) i created google autocomplete by below way. in html <input type="text" #pick id="address" class="form-control" [(ngModel)]="pickAddress" name="pickAddress" (ngModelChange)="pickAdd()" placeholder="Pick Up Address" onclick="return false" style="padding-left: 30px;border-radius: 25px;border: 1px solid #31708f;" in Ts File: pickAdd() { var autocomplete:any; var options = { componentRestrictions: {country: "IN"} }; this. inputAddress = document.getElementById(

Google Places Autocomplete suggestions with Unit No/Subpremise is not coming in the response array

守給你的承諾、 提交于 2019-12-10 01:10:03
问题 I am using Google places API to auto-complete addresses using javascript When I type the unit number and street number of address in the input box it shows the results in suggestion drop-down but when I select the address the listener for action 'place_changed' event don't have any address with address_component with type 'subpremise' even the formatted_address property don't have the unit number in it.Though it does contain other details from 'street number','city','country' etc For example

How to search local business by name, location in iOS?

∥☆過路亽.° 提交于 2019-12-09 23:47:28
问题 I am working on project in which we are displaying local business search. I am using YELP to search local business. As per YELP Documentation i have created query. But it gives result based on location only. I am trying with Google Place API but not getting desired result. My YELP request - http://api.yelp.com/v2/search/?term=restaurant&location=nyc&limit=20&offset=1 My Google Place API request - https://maps.googleapis.com/maps/api/place/textsearch/json?query=hotels+in+nyc&sensor=true&key

Is It Possible To Open Google Maps By PlaceId?

馋奶兔 提交于 2019-12-09 18:34:03
问题 I have a place id obtained from Google Places API, and the aim is opening Google Maps app via place id like similar approach of below Uri gmmIntentUri = Uri.parse(String.format(Locale.ENGLISH,"geo:%f,%f", lat, lon)); Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri); mapIntent.setPackage("com.google.android.apps.maps"); if (mapIntent.resolveActivity(getPackageManager()) != null) { startActivity(mapIntent); } Is there a way for this ? I have already latitude, longitude when user

This IP, site or mobile application is not authorized to use this API key. How to fix this issue for an ios app?

烈酒焚心 提交于 2019-12-09 18:31:33
问题 I'm working on Augmented reality in ios app. I found a nice tutorial and a sample project from this site. While running that app in my device, I received the error in NSLOG console, Response: { "error_message" = "This IP, site or mobile application is not authorized to use this API key."; "html_attributions" = ( ); results = ( ); status = "REQUEST_DENIED"; } I'd created a new project in Google dev site and created Sever Key as iOS Key is not supported for Google places Api. I'd also tried

Autocomplete textview google places api

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-09 17:33:17
问题 I followed this tutorial for doing the autocomplete textview using google places api. I want an autocomplete textview that automatically fills itself by the place names as we start typing. The above referred tutorial is exactly what I require but it is not working for me. The autofill action is not taking place.Can someone suggest a way out? Here is the main activity public class MainActivity extends Activity { AutoCompleteTextView atvPlaces; PlacesTask placesTask; ParserTask parserTask;

Google Places API library use without map - javascript

我的未来我决定 提交于 2019-12-09 16:18:09
问题 I need to get the closest establishments in 100m radius from specific coordinates. I found the Google Places API sample code, but I don't use a map in my application, since this results will be rendered in a list. Here is the API code: var map; var infowindow; function initialize() { var pyrmont = new google.maps.LatLng(-33.8665433, 151.1956316); map = new google.maps.Map(document.getElementById('map-canvas'), { center: pyrmont, zoom: 15 }); var request = { location: pyrmont, radius: 500,

Google Places API: Searching for names containing spaces

爷,独闯天下 提交于 2019-12-09 13:58:26
问题 Is it possible to search for names containing spaces? name: ['Burger King|Subway'] //fails name: ['McDonald|Subway|Chipotle'] // works https://maps.googleapis.com/maps/api/place/search/json?location=33.4,-112.0&radius=5000&name=McDonald|Subway|Chipotle&sensor=false&key=yourkeyhere Thanks! 回答1: Performing a Places Search Request with multiple keywords or names is not officially supported by the Places API therefore is not guaranteed to return accurate results. If you believe support for