google-places-api

Google Places API: How to use multiple types?

十年热恋 提交于 2019-12-22 03:25:20
问题 I need a POI API that returns ratings, photos, opening/closing times, etc and I thought Google Places API seemed to do what I want, but I am having some trouble with filtering: I want to use the autocomplete feature with multiple types for filtering. Here is what I have: var map; var selectAttractionAutocomplete; var selectCityAutocompleteOptions = { types: ['(cities)'] }; map = new google.maps.Map(document.getElementById('map-canvas'), { center: new google.maps.LatLng(-33.8665433, 151

Google Places API place_id field length

笑着哭i 提交于 2019-12-22 01:23:26
问题 Google has marked the reference and id fields as deprecated as of June 24th 2014, and replaced it with a single place_id . I've so far only seen place_id lengths of exactly 27 characters, but wonder if there is any documentation for this length? I have been unable to find this documented anywhere. Obviously knowing the length of the place_id is significant for choosing an optimal database field, and therefore something I'd like to know. From the Google Places API docs site: The id and

Parsing Google Places JSON data in Android?

自闭症网瘾萝莉.ら 提交于 2019-12-22 01:19:25
问题 I'm trying to parse Google Places JSON data in Android. I know the URL I'm passing in works (but I took my key out of the below code). I can get the JSON data to display in a TextView, but now I want to parse it and get (at this point) the first item's name to display. I modified a tutorial that parsed a twitter feed, and that twittwr tutorial displayed correctly, but my modified code displays nothing. It doesn't crash, and I don't get any errors, so I don't know what's wrong. So here's my

Google Plus 21-digit URL Number Relationship to a Google Place's ID and Reference Numbers

ε祈祈猫儿з 提交于 2019-12-21 21:39:35
问题 What is the relationship between a Google Place's ID and Reference Number and the same Place's 21-digit Google Plus number used in the Place's Google Plus URL? I want to link Google Plus URLs for 100's of different businesses to my website. However, I do not know the Google Plus URL address for each of the businesses. But I do know the Google Place ID and Reference Number for each of the businesses. Can I derive the 21-digit Google Plus Number for a business from their Google Places ID and

Use textfield instead of searchbar in GMSAutocomplete in a same manner

拥有回忆 提交于 2019-12-21 20:21:03
问题 I am using google Place Autocomplete API, i need to add UITextField instead of UISearchBar with the same functionality. here is the working code with UISearchBar which i get from https://developers.google.com/places/ios-api/autocomplete. I will add textfield and tableview myself, if someone just help me to get array of addresses from any keyword of searching. like from string (of keyword) to array(predicted places). import UIKit import GoogleMaps class ViewController: UIViewController { var

Use textfield instead of searchbar in GMSAutocomplete in a same manner

╄→尐↘猪︶ㄣ 提交于 2019-12-21 20:20:08
问题 I am using google Place Autocomplete API, i need to add UITextField instead of UISearchBar with the same functionality. here is the working code with UISearchBar which i get from https://developers.google.com/places/ios-api/autocomplete. I will add textfield and tableview myself, if someone just help me to get array of addresses from any keyword of searching. like from string (of keyword) to array(predicted places). import UIKit import GoogleMaps class ViewController: UIViewController { var

Google Places Autocomplete plugin isnt working in Firefox android

泄露秘密 提交于 2019-12-21 19:18:35
问题 We are using google's places-autocomplete plugin on our website. Of late we have received several complaints from our website visitors that this plugin isn't working in the Android version of Firefox. It works fine in the desktop version of Firefox however. The problem can be simply observed by Going to the places-autocomplete example here Trying to enter a zip code in the "Enter a location" search input You will observe the following 2 issues - Google Auto-complete should show suggestions as

How to get opening hours from google places api

血红的双手。 提交于 2019-12-21 12:42:17
问题 Here I have a code that works fine, so here is simple google places code that show me a places based on location and I add an label on every marker so: http://jsbin.com/UqafeCI/4/edit - CODE and DEMO Now I want to in label show opening time so I add to my code: if (!!place.opening_hours.periods[1].open.time) open = place.opening_hours.periods[1].open.time; and now my code looks like this: google.maps.event.addListener(searchBox, 'places_changed', function() { var places = searchBox.getPlaces(

Google Places Autocomplete with Jquery Mobile not working on mobile/touch device

非 Y 不嫁゛ 提交于 2019-12-21 10:48:39
问题 As title suggests I am building a mobile website with JQuery Mobile (1.3.0) and am trying to implement Google Places Autocomplete (API v3) to aid user input of location data. The autocomplete functions correctly on desktop device, but not when used on a mobile device (I have only tested on iOS 6). When used on mobile device the dropdown list of relevant locations do appear, but simply disappear when you press one without loading the selection on the map. I have looked around and seen some

Google Places Autocomplete + Angular2

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 10:41:19
问题 I am building a simple Google Places Autocomplete Angular2 directive but the problem is that cannot get any prediction (the response is always empty?!)... As a proof of concept I created the simplest possible code snippet as a reference: <!DOCTYPE html> <html> <head> <script src="https://maps.googleapis.com/maps/api/js?key=[MY_API_KEY]&libraries=places" async defer></script> </head> <body> <button type="button" onclick="go()">go</button> <input id="autocomplete" type="text"></input> <script>