google-places-api

Google Maps Places Autocomplete - Uncaught TypeError: Cannot read property 'getPlace' of undefined

北城余情 提交于 2019-12-06 04:48:05
setAutocomplete() { this.originPlaceId = null; this.destinationPlaceId = null; this.travelMode = google.maps.TravelMode.WALKING; this.directionsDisplay.setMap(this.map); this.setMapControls(this.map); this.setupClickListener('changemode-walking', google.maps.TravelMode.WALKING); this.setupClickListener('changemode-transit', google.maps.TravelMode.TRANSIT); this.setupClickListener('changemode-driving', google.maps.TravelMode.DRIVING); console.log(this.originInput); this.originAutocomplete = new google.maps.places.Autocomplete(this.originInput); this.originAutocomplete.bindTo('bounds', this.map)

Is possible add personal places to autocomplete in google maps api v3?

断了今生、忘了曾经 提交于 2019-12-06 04:22:40
问题 I want to use autocomplete google search but I want to introduce some personal places This was the code I used to add to search my places but the onclick doesn´t work: $(".pac-container").append('<div id="areasearch' + e + '" class="pac-item areasearch" style="display:none" onclick="clickOneAreaLocalizar(\'' + $(this).text() + '\')"><span class="pac-icon pac-icon-areas"></span><span class="pac-item-query"><span class="pac-matched"></span>' + $(this).text() + '</span> <span>Area</span></div>')

Google places API: from CID to reference?

孤人 提交于 2019-12-06 03:20:40
My objective: populate a database with known business places in order to generate maps with those places. I insist on "known places", because my users will only search for the places that are in the database. I don't want to recreate business places as markers on the map (so latitude and longitude is not enough to id a place), because the places are already available on Google Maps with interesting information (address, comments, ratings, pictures...). The natural reference is to use the CID and store it in the database. Now imagine the database is populate with places and their CID, and I

Google Maps API v3 Places Library returning undefined utc_offset

回眸只為那壹抹淺笑 提交于 2019-12-06 03:18:31
I'm developing a time and location aware application and the google maps v3 api places library has almost everything I need. However, when doing a textSearch() for specific addresses, and attempting to call getDetails() for one of the returned PlaceResult items, the PlaceResult.utc_offset property returned from getDetails() is undefined (all the other PlaceResult properties I need are returned fine, just not the utc_offset). It's strange, because if I do a textSearch() for a generic term like "pizza" and then call getDetails() for one of the returned PlaceResult items, the PlaceResult.utc

Places API not enabled for iOS even if it's already enabled

ⅰ亾dé卋堺 提交于 2019-12-06 03:18:27
I have integrated Places Autocomplete or Places API along with Maps, Google Login and Firebase RealtimeDatabase. But when I run the app, the error says: "The operation couldn’t be completed. The Places API for iOS is not enabled. See the developer's guide ( https://developers.google.com/places/ios-api/start ) for how to enable the Google Places API for iOS." Places was working fine until: Last week, I had to ditch my Firebase project and create a new one. Did what was required: -changed the GoogleServices-info.plist -client ID -url types I have already enabled the Google Places API in my

How to get latest GoogleMaps SDK using pods

喜欢而已 提交于 2019-12-06 03:08:34
问题 I'm trying out the google places sdk sample. I installed it using pod try GoogleMaps I installed GoogleMaps (1.10.5) using cocoapods source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.1' pod 'GoogleMaps' checking the GoogleMaps in both steps, the one in the sample (1) contains more headers like GMSAutocompleteTableDataSource.h Why are they different? The one in the sample seems to be a better version but the one given by pods is not the latest? Its not even in the changelog 回答1

Google Places API: Place Details limited to 5 Reviews

柔情痞子 提交于 2019-12-06 02:56:32
问题 https://developers.google.com/places/documentation/#PlaceDetails The "reviews" output list is apparently limited to the top 5 reviews. This isn't mentioned at all in the documentation. Is there way to get paginated results or more than 5? 回答1: This is explicit stated in the documentation here, under the reviews[] field explaination: reviews[] a JSON array of up to five reviews. There is currently no way to retrieve more than 5 reviews. If you think this would be a valuable feature you can

Google Places API Android: Autocompletion closes too quickly

百般思念 提交于 2019-12-06 02:40:44
问题 I added Place Autocompletion to my android app. When I click a button ( chooseLocationButton ) it opens the Autocomplete widget correctly. The problem is when I want to write a name in the search field. Directly after clicked on the first keystroke, the Autocomplete widget close and the research is not done. Here it is what it is written in the Run console: W/IInputConnectionWrapper: reportFullscreenMode on inexistent InputConnection W/IInputConnectionWrapper: finishComposingText on inactive

Fetching nearby places using google maps

拈花ヽ惹草 提交于 2019-12-06 02:05:25
问题 Am trying to implement to find nearby places of my current location using google maps. I have created a project in Google Developer Console and got 'ios APIkey' and 'Server APIkey'. I also enabled Google Places API and Google Maps SDK for iOS. Below is the code to find out near by places. func fetchPlacesNearCoordinate(coordinate: CLLocationCoordinate2D, radius: Double, name : String){ var urlString = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=\(apiServerKey)&location=\

From Google Maps CID to Place ID

时光怂恿深爱的人放手 提交于 2019-12-06 01:47:57
问题 I have a bunch of links to google maps in the form of https://maps.google.com/?cid=<identifier> . How can you go from that CID to a Place ID that can be used with the Google Places API? Is there any API endpoint that you can use to convert these URLs into the new places? 回答1: Got lucky and found an undocumented api. If you have the CID, you can call the api like https://maps.googleapis.com/maps/api/place/details/json?cid=${CID}&key=YOUR_API_KEY . I just changed place_id=${the_end_val_i_needed