google-places-api

Google maps API geolocation + radar places search

99封情书 提交于 2019-12-02 11:55:02
问题 I am trying to use both Geolocation and Places from the google maps API to display a map (at my location) with the nearest places around me. The two examples work seperately but not together. Can anyone tell me why there is a problem with this? am I overwriting the map with another or doing something else wrong? <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=AIzaSyA93l5zPyIvGB7oYGqzLSk28r5XuIs2Do8 &sensor=true&libraries=places"></script> <script> var

Bootstrap Navbar overlapping Google places autocomplete dropdown

霸气de小男生 提交于 2019-12-02 11:27:08
I have a Navbar on which I am trying to add a places search box. Everything almost works except that a small part of the google places hint box is being overlapped by the navbar (as shown in the image below). I have tried to change the z-index of the input box to 10 or 2000 or 90000 but it does not seem to have an effect. Is there something else that needs to be done that I am missing? Here is the html: <form class="navbar-form" role="search"> <div class="col-sm-2"> <div class="form-group has-feedback no-margin"> <input aria-label="Place" type="text" class="form-control text-center" id=

How to find only school results in google autocomplete api?

一个人想着一个人 提交于 2019-12-02 09:58:38
I want to search only schools in google autocomplete api. I have tried but it does not filter the search specific to schools only. I have read from below url https://developers.google.com/places/web-service/autocomplete But it has only types parameters for filtering results. I am able to search only schools in google nearby places search but it requires me to send lat, long but I want to search all schools despite of any location. At present time Places API autocomplete doesn't support filtering by types like school, restaurant, etc. There is a feature request in Google issue tracker to make

Java null pointer exception on google places fragment

我与影子孤独终老i 提交于 2019-12-02 08:42:25
I'm getting a null pointer exception when I tried to experiment with the autocomplete places feature. I added the fragment like in the docs and require help in resolving this one. Thank you. MainActivity package com.example.srinivas.mapautocompletetest1; import android.support.v4.app.FragmentActivity; import android.os.Bundle; import android.util.Log; import android.widget.TextView; import com.google.android.gms.common.api.Status; import com.google.android.gms.location.places.Place; import com.google.android.gms.location.places.ui.PlaceAutocompleteFragment; import com.google.android.gms

AutoCompleteTextView is not getting the suggestions from Google Places API

谁说我不能喝 提交于 2019-12-02 07:51:03
问题 This is my code to get the Places suggestions from Google Places API. But it is showing some error like "Cannot connect to Google Places API". I have given the proper error which I am getting at the bottom of this code. I just need an AutoCompleteTextView to be populated with GeoLocations. For example, if the user types in "Deh", suggestions starting from Deh should appear right away,like, "Dehradun, India" public class MainActivity extends ActionBarActivity { Button selectRoute; private

Google maps API geolocation + radar places search

筅森魡賤 提交于 2019-12-02 07:35:06
I am trying to use both Geolocation and Places from the google maps API to display a map (at my location) with the nearest places around me. The two examples work seperately but not together. Can anyone tell me why there is a problem with this? am I overwriting the map with another or doing something else wrong? <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=AIzaSyA93l5zPyIvGB7oYGqzLSk28r5XuIs2Do8 &sensor=true&libraries=places"></script> <script> var map; var service; var marker; var pos; function initialize() { var mapOptions = { zoom: 15 }; map = new

Google place api shows error in Android

荒凉一梦 提交于 2019-12-02 07:18:38
I am facing a strange problem here. I want to query the google places webservice from my andorid app. For that I am always getting the error : "This service requires an API Key". How ever when I try to query it using my chrome browser and the server key, I get the response properly. In case of android, which key should I use as the android api key is giving me this error. Adding a package name is optional : Edit This is the request url : https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=cruise&key

Where do I retrieve the photo_reference value to make a Google Places Photos request?

て烟熏妆下的殇ゞ 提交于 2019-12-02 07:16:20
From Google's Place Photos documentation I should be able to retrieve a photo_reference key from making a request to their nearby search, radar, or place details services. I'm hitting their place details service, and I'm receiving an array of photos with 10 elements, but these elements only contain the height , width , and html_attribution keys. Am I missing something here or has their API changed without updating their documentation? Here's my request to place details, where place is the response: export function placeDetailsFetchData(placeId) { return (dispatch) => { const request = {

AutoComplete Google Places get error :This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console

余生颓废 提交于 2019-12-02 07:13:07
i'm trying to develop Maps with autocomplete textview with Google API. i tried this tutorial here but i always get this error when i'm tryin to get the API : { "error_message" : "This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console: Learn more: https://code.google.com/apis/console", "predictions" : [], "status" : "REQUEST_DENIED" } i tried to find the solution, and i tried all the solution, like to use a browser key , server key , enable the google places & map , delete & recreate project , but i still get the error here is my code :

OnPlaceSelectedListener of SupportPlaceAutocompleteFragment not fired

☆樱花仙子☆ 提交于 2019-12-02 07:00:36
问题 I'm having a problem with the OnPlaceSelectedListener method of a SupportPlaceAutocompleteFragment . My onViewCreated() method: @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); // Initialise a new fragment inside of this one. mFragmentManager = getChildFragmentManager(); mSupportMapFragment = (SupportMapFragment) mFragmentManager.findFragmentByTag("mapFragment"); mSupportPlaceAutocompleteFragment =