开发者

Google map using intent

I have 2 tabs in my application and one of that is for location Map. So i have set that tab to start an activity to show the map.

code:

Intent intent = new Intent(android.content.Intent.ACTION_VIEW, 
Uri.parse("http://maps.google.com/maps?saddr=20.344,34.34&daddr=20.5666,45.345"));
startActivity(intent);

I dont want to use googleAPi key and get 开发者_如何学Cthe map, and i want to do it by intent. But the problem here is, the map will be displayed over the complete screen and the tabs are not visible.

Is there a way i can display some button/ tab along with the map when the map is displayed using an intent ( not Mapactivity and setting APIkey )


Your code (the Intent) starts Google Maps as a separate application. This is what Intents are supposed to do.

If you want Maps as a part of your application (visible within Tabs) you will need to use MapActivity or `MapView' (and provide the Maps key, of course). There is no way around it. For more details see http://code.google.com/android/add-ons/google-apis/maps-overview.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜