gpt4 book ai didi

Android Studio - 谷歌地图搜索

转载 作者:搜寻专家 更新时间:2023-11-01 07:53:22 31 4
gpt4 key购买 nike

我想实现一种类似于谷歌搜索 map 的方法,用户可以在其中输入地址,点击按钮,然后转到他们提供的地址,有没有什么地方可以让我在线阅读,谢谢,

最佳答案

从 Google 的官方文档中查看:https://developers.google.com/maps/documentation/android/

如果您喜欢视频教程:https://www.youtube.com/watch?v=awX5T-EwLPc

如果您只想启动 Google map 应用:

Uri gmmIntentUri = Uri.parse("geo:37.7749,-122.4194");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
mapIntent.setPackage("com.google.android.apps.maps");
startActivity(mapIntent);

Use this intent to display search queries within a specified viewport. When the query has a single result, you can use this intent to display a pin at a particular place or address, such as a landmark, business, geographic feature, or town.

geo:latitude,longitude?q=query
geo:0,0?q=my+street+address
geo:0,0?q=latitude,longitude(label)

更多信息在 https://developers.google.com/maps/documentation/android/intents .

关于Android Studio - 谷歌地图搜索,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31619194/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com