Tag: google-maps

MapFragment return null

mMapFragment = (SupportMapFragment) getSupportFragmentManager() .findFragmentByTag(MAP_FRAGMENT_TAG); // We only create a fragment if it doesn’t already exist. if (mMapFragment == null) { mMapFragment = SupportMapFragment.newInstance(); // Then we add it using a FragmentTransaction. FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); fragmentTransaction.add(MapLay.getId(), mMapFragment, MAP_FRAGMENT_TAG); fragmentTransaction.commit(); mMap=mMapFragment.getMap(); By this code map is visible but unable to access the map mMap=mMapFragment.getMap(); show […]

Getting latitude and longitude from latlng object in android

I am trying to get latitude and longitude on the Googlemap v2.. I have set the onclick listener for mapragment object using the code map.setOnMapClickListener(new OnMapClickListener() { @Override public void onMapClick(LatLng latln) { // TODO Auto-generated method stub String s=latln.toString(); Log.w(“dsfdsf”,””+s); } }); It provides be the latitude and longitude coordinates in the format lat/lng: […]

One Google Maps key for all developers?

We are using a Google MapView in our application but on different computers we must use different API keys, otherwise the MapView doesn’t display anything. Is there a way to set one key for all developers?

Google Maps API V2 'Failed to Load Map. Could not contact Google Servers', Even I check permission and keystore

I follow the guide to create a google map sample, but it always throw following error. E/Google Maps Android API(27821): Failed to load map. Could not contact Google servers. permission READ_GSERVICES and debug and release keystore have been tested. They also can’t resolve above problem. Could anyone tell me why it throw that error? Manifest […]

Android Google maps API V2 center markers

Is there a way to make a map zoom in as far as possible but keeping all of the markers on screen at the same time. I have six markers in a non uniform shape. I was thinking of just taking their centre and locating the map to that, but I still then do not […]

Change the margin color of InfoWindow view of marker in google maps api v2

Hello I try to change the default color that have (white) to black, this in the google maps api v2, anyone know how I can do this? PD: is the margin of infowindow this is my code where I change the content of infowindow but need change the margin :S GoogleMap map = …. map.setInfoWindowAdapter(new […]

How to clear all the markers in v2 google map?

I need to clear all markers in v2 google map. And again need to add some markers. If anybody knows the answer kindly share your thoughts.

Removing the highlight when touching infoWindow adapter

I’ve implemented a custom infoWindow which I programmed to display when touching a marker. When I touch the infoWindow, it highlights in the default blue color (on Jelly bean) as stated by the Google Maps v2 API. The issue is that I can’t seem to disable this highligh. I have tried adding: <android:clickable=”false”> but it […]

How to smoothly keep moving current location marker in Google Maps v2 android

I have placed a marker for my location. I would like to move my marker smoothly something like the Google maps app. The blue circle moves very smoothly when I keep moving in my car. I would like implement the same for my app. how do I implement this on my app? As of now […]

Change or completely remove the highlight color of an InfoWindow of the Google Maps v2 on Android

Is there any possibility to change the highlight color of an InfoWindow in the Google Maps v2 component for Android? I already accepted the fact that there is no common way to apply custom press highlights for the widgets that reside in a custom InfoWindow View passed through a custom InfoWindowAdapter as the View is […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.