google 静态地图 api 通话不工作我需要一个结算帐户还是 api 通话有误?
google static map api call not working do I need a billing account or api call is wrong?
我在没有创建结算帐户的情况下生成了 api 密钥。这是我创建的 URL
https://maps.googleapis.com/maps/api/staticmap?size=600x400¢er=37.0902%2C-95.7192&zoom=4&markers=Marker%7BmarkerId%3A+MarkerId%7Bvalue%3A+LatLng%2823.8303239%2C+90.4218414%29%7D%2C+alpha%3A+1.0%2C+anchor%3A+Offset%280.5%2C+1.0%29%2C+consumeTapEvents%3A+false%2C+draggable%3A+false%2C+flat%3A+false%2C+icon%3A+Instance+of+%27BitmapDescriptor%27%2C+infoWindow%3A+InfoWindow%7Btitle%3A+null%2C+snippet%3A+null%2C+anchor%3A+Offset%280.5%2C+0.0%29%7D%2C+position%3A+LatLng%2823.8303239%2C+90.4218414%29%2C+rotation%3A+0.0%2C+visible%3A+true%2C+zIndex%3A+0.0%2C+onTap%3A+null%7D&key=MY-API-KEY
MY-API-KEY 是我放置 API 密钥的地方。但是当我为我的应用程序调用此 URL 时,它会给出 HTTP request failed, statusCode: 403
当我在浏览器中点击它时,我得到 The Google Maps Platform server rejected your request. You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started
URL 有问题吗?或者如果没有结算帐户就无法访问 google 静态地图 API?
请不要忘记从 API 和服务菜单的库部分为 Android 启用 Maps SDK。 https://cloud.google.com/maps-platform/
获得 Api 密钥后,请将其粘贴到 AndroidManifest.xml 文件中的以下代码中,并按如下所述添加此代码
<application>
...
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="your API key"/>
...
</application>
我在没有创建结算帐户的情况下生成了 api 密钥。这是我创建的 URL
https://maps.googleapis.com/maps/api/staticmap?size=600x400¢er=37.0902%2C-95.7192&zoom=4&markers=Marker%7BmarkerId%3A+MarkerId%7Bvalue%3A+LatLng%2823.8303239%2C+90.4218414%29%7D%2C+alpha%3A+1.0%2C+anchor%3A+Offset%280.5%2C+1.0%29%2C+consumeTapEvents%3A+false%2C+draggable%3A+false%2C+flat%3A+false%2C+icon%3A+Instance+of+%27BitmapDescriptor%27%2C+infoWindow%3A+InfoWindow%7Btitle%3A+null%2C+snippet%3A+null%2C+anchor%3A+Offset%280.5%2C+0.0%29%7D%2C+position%3A+LatLng%2823.8303239%2C+90.4218414%29%2C+rotation%3A+0.0%2C+visible%3A+true%2C+zIndex%3A+0.0%2C+onTap%3A+null%7D&key=MY-API-KEY
MY-API-KEY 是我放置 API 密钥的地方。但是当我为我的应用程序调用此 URL 时,它会给出 HTTP request failed, statusCode: 403
当我在浏览器中点击它时,我得到 The Google Maps Platform server rejected your request. You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started
URL 有问题吗?或者如果没有结算帐户就无法访问 google 静态地图 API?
请不要忘记从 API 和服务菜单的库部分为 Android 启用 Maps SDK。 https://cloud.google.com/maps-platform/
获得 Api 密钥后,请将其粘贴到 AndroidManifest.xml 文件中的以下代码中,并按如下所述添加此代码
<application>
...
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="your API key"/>
...
</application>