google-maps-android-api-2

how to show an info window without showing the icon of a marker in google map

牧云@^-^@ 提交于 2019-12-11 02:48:00
问题 Can I show only the info window in google map? I am developing an Android app with Google Map's V2 api. I wanted to show the route information in a info window, but I don't want to show the marker icon. So can info window be separated from a marker? If so how can I only display the info window while hiding the marker. Thanks 回答1: Wow it would be interesting to do so. I don't know if you can do that without a marker. because the documentation of google says something like this: Google Maps for

Can i detect if a user canceled navigation from Google Maps App

纵饮孤独 提交于 2019-12-11 01:49:14
问题 My app calls an Intent to open the Google Maps App like so Intent navigation = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q="+trueFriend.lat+","+trueFriend.lon)); startActivity(navigation); When i do that i would like to set a ProximityListener to detect if the user has arrived to there location, then let the other user know that they have arrived. That much i can do, however in order to prevent a few issues i need to detect if a user has canceled there navigation, or stopped

How to load Google map in background in android?

陌路散爱 提交于 2019-12-11 01:38:17
问题 I have fragment for map in XML file as below, <fragment android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" class="com.google.android.gms.maps.SupportMapFragment" > </fragment> In which activity I am displaying the Google map, that is not a main activity. I am redirecting to map activity from my main activity on button click. There is no any problem with map. But when I click on button of main activity then the process stops for sometime and suddenly

How can I get the visible markers in Google Maps v2 in Android?

a 夏天 提交于 2019-12-11 01:28:51
问题 In Google Maps v2 for Android, how can I get the visible markers? I know I can use Projection and eliminate points < 0 and points > screen size. But I do not wish to check one by one, it can be too slow if I have a lot of markers. Is there any easy way? Or some off-the-shelf solution? If yes, which one? 回答1: Ok, the following is the code the I have used before to determine what the user can see and then only draw the markers that are visible. I think you might be able to adapt it to your

Android google maps v2 navigation

心已入冬 提交于 2019-12-11 01:26:49
问题 I'm using google map v2 for showing locations in my application. When I want to navigate to that particular location I use the following code which starts the default navigation application installed in my phone. Intent navigation = new Intent(Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?saddr=aa,bb&daddr=xx,yy")); startActivity(navigation); So obviously we will leave our application and go to the default navigation application. Is there any chance that I can do the turn-by-turn

Programmatically clearing map cache

依然范特西╮ 提交于 2019-12-10 22:43:44
问题 I have caching enabled in my SupportMapFragment created with the Android Google Maps API v2. I'd like to be able to programmatically clear the cache of my program within the application itself, a requirement being levied on me. I am doing this using the trimCache() method described here by crony_cd. When I execute this method though, it only seems to be deleting a small piece of the cache, presumably the cache files that my own application is creating, not the cache files created by the

Android Google Maps V2 Title or Snippets Strings From HTML

人盡茶涼 提交于 2019-12-10 22:17:53
问题 Hi i'm working on a google maps v2 project on Android and i need to write a bit HTML code (like a page) and implement it to google marker's title or snippet. I know there are ways like : http://wptrafficanalyzer.in/blog/customizing-infowindow-contents-in-google-map-android-api-v2-using-infowindowadapter/ here but i need to write HTML codes because after this work i will use these codes again in another mobile project. Any help would be appreciated, thanks 回答1: According to this page, you are

Drawing a polygon over the entire map

纵饮孤独 提交于 2019-12-10 20:52:03
问题 I'm using Google Maps V2 for Android, and I need to draw a polygon over the entire map, then add a hole in a selected town. The purpose of this is to highlight specific areas of the map, according to some options. I tried drawing a polygon over the entire map with the following bounds: Arrays.asList(new LatLng(90, -180), new LatLng(-90, -180), new LatLng(-90, 180), new LatLng(90, 180), new LatLng(90, -180)); But the polygon does not get drawn into the map. I tried reducing the bounds to a

How to display a Google Maps Android Marker on top of the others?

筅森魡賤 提交于 2019-12-10 20:20:59
问题 I have multiple markers in my application, sometimes some of them are at the same position. I want some of those markers to be always displayed in front of the others. How should I proceed ? Thank you in advance. 回答1: I think this is the wrong approach. Even if you put one marker in front of the other there is still a possibility that the user will click the marker that is behind. I would instead of doing that, on adding a new Marker to the map, check if there is already a Marker at the newly

How to open new activity (or dialog or link) from a Infowindow - Google Maps v2 Android

一笑奈何 提交于 2019-12-10 19:28:10
问题 I want to open a new activity (or a custom dialog or a link) from a infowindow. I want my UI works in this way: 1) I see the map 2) I click on a marker to show an Infowindow 3) I click a button (or something else) into the Infowindow to open a new activity (or a dialog) to show more information. Alternatively, I click a link into the Infowindow to open a webpage to show more information. I would prefer to open a new activity or dialog. By the way, can you show me the easier way to do this?