小编Jea*_*ndo的帖子

Google 地方信息自动完成无法加载搜索结果

我正在尝试实现 Google Places Autocomplete API,有时我能够获取位置列表,但有时我会收到“无法加载搜索结果”的消息。有人可以帮我解决这个问题。

android google-maps google-maps-api-3 google-places-api

11
推荐指数
1
解决办法
1万
查看次数

Google Maps Android API:授权失败。确保已启用“Google Maps Android API v2”。确保以下 Android Key 存在

我收到此错误:

E/Google Maps Android API: Authorization failure.  Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
E/Google Maps Android API: In the Google Developer Console (https://console.developers.google.com)
Ensure that the "Google Maps Android API v2" is enabled.
Ensure that the following Android Key exists:
    API Key: [The key...]
    Android Application (<cert_fingerprint>;<package_name>):
Run Code Online (Sandbox Code Playgroud)

这就是我所看到的,而不是地图正常工作:

在此处输入图片说明

在我的app/build.gradle,我有这个:

implementation 'com.google.android.gms:play-services-base:16.1.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.8'
implementation 'com.google.android.gms:play-services-awareness:16.0.0'
implementation 'com.google.android.gms:play-services-cast:16.2.0'
implementation 'com.google.android.gms:play-services-gcm:16.1.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
Run Code Online (Sandbox Code Playgroud)

play-services-location是我需要的谷歌地图,对吗?我正在查看https://developers.google.com/android/guides/setup上的列表,我认为这Google Location and Activity Recognition - com.google.android.gms:play-services-location:16.0.0就是 …

google-maps google-maps-api-3 google-play-services google-maps-android-api-2 google-maps-android-api-1

5
推荐指数
1
解决办法
5096
查看次数

带有 cURL 的 Google Geocoding API 请求被拒绝。我有一个与启用计费的项目相关联的 API 密钥

我正在尝试使用以下内容访问 Google 的地理编码 API:

curl https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=XXX

我得到以下信息:

{"error_message":您必须使用 API 密钥来验证对 Google Maps Platform API 的每个请求。更多信息请参考http://g.co/dev/maps-no-account ", "results": [], "status": "REQUEST_DENIED"}

我传递的密钥与启用了地理编码和地点 API 的项目相关联,并且该项目也启用了计费。

curl google-maps google-api google-maps-api-3 google-geocoding-api

5
推荐指数
1
解决办法
1887
查看次数

当我没有超过每日免费请求数时,为什么我总是收到 MAX_ELEMENTS_EXCEEDED 错误?

所以我开发了一个代码,我在其中读取包含一些位置的文件(更准确地说是 15 个),其中第一个是仓库,其他 14 个位置是公共汽车需要经过以收集患者的地方。为了做到这一点,我使用 Google Maps API 密钥来收集真实距离并将它们最终写入 .txt 文件中。

import pandas as pd
import googlemaps
from itertools import tee
import numpy as np

#Read CSV file into data frame named 'df'
#change seperator (sep e.g. ',') type if necessary
df = pd.read_csv("D:/Utilizadores/Documents/FEUP/2018-2019/1º Semestre/PDI/Relatório/locais2.txt", sep='\\t',
                       engine='python', skiprows=[0], names=["address", "latitude", "longitude"])

lat = np.expand_dims(np.array(df["latitude"]), 1)
lon = np.expand_dims(np.array(df["longitude"]), 1)
coordinates = np.concatenate((lat, lon), axis=1)

coordinates = list(coordinates)
coordinates = [list(coor) for coor in coordinates]


#Perform request to use the Google …
Run Code Online (Sandbox Code Playgroud)

google-maps google-maps-api-3 google-distancematrix-api

2
推荐指数
1
解决办法
2005
查看次数