Questions tagged [android-maps-v2]

The new Google Maps Android API v2 allows you to offer interactive, feature-rich maps to users of your Android application.

With the Google Google Maps Android API v2, you can add maps based on Google Maps data to your application. The API automatically handles access to Google Maps servers, data downloading, map display, and response to map gestures. You can also use API calls to add markers, polygons, and overlays to a basic map, and to change the user's view of a particular map area. These objects provide additional information for map locations, and allow user interaction with the map.

Related tags:

1138 questions
24
votes
19 answers

In Version 2 Map view does not show map

Map Activity doesn't showing map, it's appear as just white screen with zoom control buttons. Manifest File like this :
Suraj
  • 550
  • 1
  • 5
  • 17
24
votes
5 answers

MapFragment gets a dark overlay when used in DialogActivity

I'm trying to show a MapFragment of the Android Maps v2 API in an Activity with the @android:style/Theme.DeviceDefault.Light.Dialog.NoActionBar theme. This works fine. However, the map gets a dark overlay: When I change the theme to…
nhaarman
  • 98,571
  • 55
  • 246
  • 278
23
votes
5 answers

get latitude and longitude with geocoder and android Google Maps API v2

I'm using the Google Maps API v2 for android and works properly. However, I am trying to use geocoder to get the longitude and latitude of an address, but without success. It has changed the way to do it from the v2? I am using the conventional…
Sergio76
  • 3,835
  • 16
  • 61
  • 88
22
votes
4 answers

Identify if point is in the polygon

As per my requirement, I am drawing polygons on google map shown in the image below.(using maps v2) Now I need to show an alert when user enters that particular polygons. How to identify if my current location is with in the polygon. (Need…
Supriya
  • 1,078
  • 1
  • 8
  • 16
22
votes
2 answers

Hide markers info window in android google maps API v2

Currently I was able to view all my markers in Google maps using Android Google maps API v2. Adding my marker in map: mapView.addMarker (new MarkerOptions() .position(aUsersLocation). …
user915303
21
votes
8 answers

ClusterManager repaint markers of Google maps v2 utils

I'm making a server request and when I receive the response from server, I'm executing on UI Thread a ClusterManager.addItem() but this items are not painting in the map, only when I make a zoom update (+,-) newly added items starts appearing. I…
PaNaVTEC
  • 2,505
  • 1
  • 23
  • 36
21
votes
4 answers

How do you programmatically change the width & height of Google Maps v2 (support Fragment)?

How do you programatically change the width and height of a com.google.android.gms.maps.SupportMapFragment? I'd imagine you might be able to wrap it in a viewgroup with match_parent, but I'm hoping not to nest if I don't have to (honestly not even…
loeschg
  • 29,961
  • 26
  • 97
  • 150
20
votes
4 answers

Android Google Map how to check if the gps location is inside the circle

I'm trying to detect if a user is in the radius of a Marker , using the users gps location. I have the marker's coordinates, but I don't know how to calculate whether the user is in the area. I've tried to use the following, but even when the…
AND4011002849
  • 1,971
  • 8
  • 38
  • 81
18
votes
4 answers

Google Maps Android API v2 SupportMapFragment memory leak

Using 2 simple activities. First Activity which only holds a button to start the 2nd Activity which holds the map: Main Activity: public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { …
17
votes
3 answers

update polyline according to the user moving android googleMaps v2

I have googleMap (v2) with polyline that presents a route between the user current location and the destination point. Now, I want to update the polyline according to the user moving. I tried to redrawing the whole polyline when location is changed…
dvrm
  • 3,749
  • 4
  • 34
  • 43
17
votes
3 answers

TileProvider method getTile - need to translate x and y to lat/long

I’m porting an iOS app to Android, and using Google Maps Android API v2. The application needs to draw a heatmap overlay onto the map. So far, it looks like the best option is to use a TileOverlay and implement a custom TileProvider. In the method…
17
votes
2 answers

What is recommended way to use Google Map v2 inside fragment?

I want to add map inside fragment with custom layout. I can do it using ChildFragmentManager that will add SupportMapFragment. This approach im currently using. However it has disadvantage because child fragment transaction is asynchronous and its…
Alexey Zakharov
  • 24,694
  • 42
  • 126
  • 197
16
votes
10 answers

"Error inflating class fragment" with google map

I tried to make a sample project using Google Map, but I couldn't. Help me please! Test Device : Android 4.0.4 Error Message : 12-29 23:45:32.605: E/AndroidRuntime(9437): FATAL EXCEPTION: main 12-29 23:45:32.605:…
otheng
  • 169
  • 1
  • 1
  • 5
15
votes
1 answer

Android - Disable MyLocation button on google map

I am using latest Google Maps API. My problem goes like this: I want to remove the MyLocation button (The blue dot/arrow) WITHOUT disabling MyLocation layer. if I use this code: googleMap.getUiSettings().setMyLocationButtonEnabled(false); It…
user2745814
  • 259
  • 1
  • 2
  • 9
15
votes
3 answers

Check if marker is inside circle radius

I'm trying to know if a given marker is inside a circle radius. In javascript, i can do something like: google.maps.geometry.spherical.computeDistanceBetween(latLngCircleCenter, latLngPoint); But in android, using maps-v2, i'm stucked.
Otuyh
  • 2,384
  • 5
  • 22
  • 40
1 2
3
75 76