简体   繁体   English

带有景点的Google Maps Navigation Android

[英]Google Maps Navigation Android with sights

I want to open Google Maps to navigate from point A to B. Over some other points. 我想打开Goog​​le地图从A点导航到B点。 And it should show me near sights. 它应该向我展示附近的景点。

This is how i start the intent right now: 这就是我现在开始意图的方式:

Intent navigation = new Intent(Intent.ACTION_VIEW, Uri //saddr=46.625799, 14.312887 &daddr=46.623510, 14.300612 &mode=bicycling &restaurants
                    .parse("http://maps.google.com/maps?saddr=46.625799, 14.312887 &daddr=46.623510, 14.300612 &mode=bicycling &q=restaurants" ));
startActivity(navigation);

But it doesn't show me the nearby restaurants... I mean I don't want restaurants I want sight but I have no idea what I should write instead of restaurants... 但这并没有向我显示附近的餐馆...我的意思是我不想让我希望看到的餐馆,但我不知道该写些什么而不是餐馆...

You will have to call a different API for it. 您将必须为此调用其他API。 First, sights can be a bit vague, Places API however have different supported Places Types that you can pick which will match with what you intend to have. 首先,景点可能有点模糊,但是Places API具有不同的受支持的Places类型 ,您可以选择它们与您想要的类型相匹配。

In terms of actual search, you can look at how to call Place Search . 在实际搜索方面,您可以查看如何调用“位置搜索” Just set the optional parameter type and you're good to go. 只需设置可选参数type ,就可以了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM