google-maps-android-api-2

How to hide “Navigation” and “GPS Pointer” buttons when I click the marker on the android google map

笑着哭i 提交于 2019-11-26 15:43:52
问题 When I click the marker on the google map, "Navigation" and "GPS Pointer" buttons come out.How can I hide those two buttons programatically in android development? 回答1: For the button group you have outlined in red, you can disable it using the setMapToolbarEnabled() method in UISettings. From the documentation: Sets the preference for whether the Map Toolbar should be enabled or disabled. If enabled, users will see a bar with various context-dependent actions, including 'open this map in the

How to use google map V2 inside fragment?

僤鯓⒐⒋嵵緔 提交于 2019-11-26 15:36:02
问题 I have a fragment which is a part of Viewpager, and I want to use Google Map V2 inside that fragment. This is what I have tried so far, In my fragment, private SupportMapFragment map; private GoogleMap mMapView; @Override public void onActivityCreated(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onActivityCreated(savedInstanceState); FragmentManager fm = getChildFragmentManager(); map = (SupportMapFragment) fm.findFragmentById(R.id.map); if (map == null) { map =

How to show my current location in Google Map Android using google API client

房东的猫 提交于 2019-11-26 15:28:36
问题 I want to show my location on a map and zoom in on it. I want to use the GoolgeAPIClient. The map renders and the the pointer is created but the location so wrong. I feel that the onMapReady is executed first even before the onConnected method of the GoogleAPIClient is called. Please help this is my code. import android.location.Location; import android.support.v4.app.FragmentActivity; import android.os.Bundle; import android.util.Log; import android.widget.TextView; import android.widget

How can I handle map move end using Google Maps for Android V2?

北战南征 提交于 2019-11-26 15:23:51
问题 I want to geocode address as soon as map center has been changed. How can I handle map moveend with new Google Maps for Android V2? (I'm talking about the case then user drags map by finger) 回答1: Here is a possible workaround for determining drag start and drag end events: You have to extend SupportMapFragment or MapFragment. In onCreateView you have to wrap your MapView in a customized FrameLayout (in example below it is the class "TouchableWrapper"), in which you intercepts touch events and

Animating markers on Google Maps v2

戏子无情 提交于 2019-11-26 15:14:38
What is the best way to animate markers on Google Maps using v2 API? I am working on a map-centered game where I track locations of people and display them on the map for each other to see. As people move, I want to animate a marker from his current to his latest position. Every person has a direction, so I need to rotate the marker appropriately. What is the best way to do it using the new Google Maps API? DiscDev Some Google engineers have provided a nice demo video with some elegant sample code about how to animate markers from a starting point to an ending point, for all various versions

android Maps API v2 with custom markers

◇◆丶佛笑我妖孽 提交于 2019-11-26 15:07:53
I want to make maps with custom markers. In API v2 I can set icon, title, etc for markers. But I want to display title with marker at the first onset. Now title displays only when I taping the marker. In v1 was overlays, but in v2 I didn't found anything similar. Edited: Maybe I was not clear enough. Something like Marker.showInfoWindow() in API works only for one marker. I can't show info windows for all of my markers at the same time. Anyway I need to show titles for all of my markers, without waiting while user will tap on it. I have also stumbled upon this problem. V2 API is a step forward

How to Draw Route in Google Maps API V2 from my location [duplicate]

。_饼干妹妹 提交于 2019-11-26 14:08:46
问题 This question already has answers here : Android: How to draw route directions google maps API V2 from current location to destination (5 answers) Closed 5 years ago . I want to make direction application but, i have problem to draw route from my location to destination, i get variabel longitude and latitude from my location , but i dont know to draw line .. i want to draw direction to this location = -6.984873352070259,108.48140716552734. please help me guys.. i have read the quetions before

Ensure that the “Google Maps Android API v2” is enabled. I am getting this error when I try to Implement Google Maps

大城市里の小女人 提交于 2019-11-26 13:46:14
问题 I am working on google maps and I am getting this error. I had done the following things: Got My sha1 fingerprint. Registered my project and got my project key. I don't know to how to get Google Maps Android API v2 enable because all the links I have tried are old and Google had changed it's site design. Please help me. I already have wasted a lot of time on this. My Logcat: Authorization failure. Please see developers.google.com/maps/documentation/android-api/start for how to correctly set

How do I know the map is ready to get used when using the SupportMapFragment?

两盒软妹~` 提交于 2019-11-26 13:19:30
In the onCreate method, I am making use of the SupportMapFragment to show a map. SupportMapFragment fragment = new SupportMapFragment(); getSupportFragmentManager().beginTransaction() .add(android.R.id.content, fragment).commit(); In conjunction to this, I would like to add a marker. The problem is when the call to getMap is null, when can I try again? Is there an event I can register for or is my approach in and of itself wrong? mMap = ((SupportMapFragment)(getSupportFragmentManager().findFragmentById(R.id.map))).getMap(); if(mMap == null) //what do I do here? The map is in fact displaying on

Google Maps v2 Marker zOrdering - Set to top

只愿长相守 提交于 2019-11-26 13:10:09
问题 I know there are a few threads around on this topic but i havent yet found a good enough solution. I NEED to place a marker over the top of all other markers. How do i do this? I have tried adding this marker before and after all other markers, however the ordering seems to be from bottom (front) to top (back) on the map view. This is not acceptable as I want to center on a marker which is in front of all markers. I know that Polygons can be zOrdered but I would MUCH prefer a nicely styled