Tag: google-maps

Android Google Maps v2 not showing Compass and Location Icon

I am not able to show the compass icon and the my location icon either. I have the code googleMap.getUiSettings.setMyLocationButtonEnabled(true) and googleMap.getUiSettings().setCompassEnabled(true); but it is not showing on the maps. package com.ctc.weathermap; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.MapFragment; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.MarkerOptions; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.location.Location; import android.location.LocationListener; import […]

Android: access saved google locations programmatically

Google maps allows the possibility of saving favourite locations for ease of access later… see here. In Android, where a location is required to be entered, it would be neat if there were an API to enable the user to choose from their already-saved favourite locations, e.g. via a picker dialog or something along those […]

Filling Color in polygon while points intersecting in Android

I am trying to draw a polygon using hand on google map and then filling the color to the polygon. Normally the color is filling fine and working as expected but if the polygon has intercepting point then the fill color is not working. I am using below code to draw polygon and fill the […]

Android basic API v2 MapActivity outOfMemory with 10 markers

I am trying to implement map using Android Maps API v2 with Android Support Library, testing on Droid2 with Android 2.2 Everything is working well but just for a short period of time. Once I add 10 markers and try to move the map around or zoom in/out the following errors are thrown every second […]

Android Maps API v2 Marker with custom defined anchor jumps when dragged

I have an Google Maps Android v2 API marker that I have set an anchor at 0.5/1.0. Just placing the marker works fine. The problem is when I drag the marker, on first move it jumps up and to the left up by approximately the height of the image (1.0) and half the width (0.5). […]

Android PlacePicker closes 2 seconds after launch

Unfortunately I couldn’t find an answer at Android Place Picker closes immediately after launch. For me the PlacePicker launches, shows location as Unknown and then returns with the resultCode 2. To reaffirm some truths: My app has two activities so far. The first activity is a map, which works fine so far; no problem there. […]

Google Maps Android API v2 blocks UI thread

Inside FragmentActivity I replace Fragment which has nested TabPageIndicator (2 tabs inside). First tab – Fragment with Description. Second tab – Fragment with map inside + markers! When I start FragmentActivity, pause is nearby 3-8 sec (depends on performance of the phone). Reason – map rendering. How can I speed up launching? FragmentStatePagerAdapter @Override public […]

Android Maps V2: Polygon fill disappears when zooming out

I am trying to show multiple polygons on my MapView, some of them overlap and have different colors. When I add them everything looks good, but as soon as I zoom out, many (not all) of the polygons stop being filled. Zooming back and forth and scrolling sometimes fills some of them again, but it […]

GoogleMaps GroundOverlay blinks my images

I’m using GoogleMaps in my Android app, and I want to display an animated radar image on the map. I have an array of 6 Bitmaps. When the user hits play, the map loops through displaying each of those images on the map. This is working, but when transitioning between the images, if I don’t […]

Applying setRotation to Maps API v2

I need to create tilted view in Maps API v2. I know that API v2 have feature to tilt the view, but that’s not enough for my use (I need 70-75 degrees), so I tried to use .setRotationX method. When I apply rotation, the view itself is shortened (which means that some sort of rotation […]

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