Questions tagged [google-maps-android-api-2]

Google Android Maps Api v2 is the next generation of Google Maps SDK available for Android developers.

Related tags:

Useful links:

3484 questions
1
vote
2 answers

Android Google Map API 11

I want to use satelite view and street view in my addLocation Activity..which method Should I call for satelite view and street view...` public void onClick(View v) { // AddLocationActivity.this.mapView.setSatellite(false); …
1
vote
1 answer

How to bind google map markers in a circle?

I need to bind multiple markers in a google map circle. I am calling following method from onMapReady to load markers: void addMarker() { mMap.clear(); for (int i = 0; i < response.getData().getCount(); i++) { float lat =…
1
vote
3 answers

Android: strange npe on MapView onDestroy inside an activity

I'm using a mapview inside an activity, but I'm receiving a strange null pointer exception that I can't seem to pinpoint the cause of. xml:
1
vote
2 answers

App Crashes when entering invalid or null location using geocoder

I have been working on google maps and want the user can access location using geocoding, although it is working but the problem arises when the user enters invalid location or null location in edit text, my app gets crashed. This is my code: (on…
Pihu
  • 1,041
  • 11
  • 35
1
vote
2 answers

GoogleMap GroundOverlayOptions: Squeeze image to four LatLngBounds

I'm trying to add an image to a Google Map using the Google Maps Android API v2: mMap = googleMap; LatLng sw = new LatLng(47.01377857060625, 8.305519705172628); LatLng ne = new LatLng(47.01395211967171, 8.306270482717082); LatLng nw = new…
user3105453
  • 1,881
  • 5
  • 32
  • 55
1
vote
1 answer

Reading from a database onto Google Maps

There appear to be a number of similar questions on this subject, but they either use a different programming language (I am programming with Java) or don't answer my question. I am using Android Studio to create a Google Maps application. I would…
1
vote
1 answer

GoogleMap Fragment Blocks Custom Touch Events

I have a SupportMapFragment and I am trying to draw a user drawn line, exactly like here, I am trying to use this questions accepted answer using Alternative Method #2, which seems to allow you to put the SupportMapFragment in a FrameLayout.…
1
vote
1 answer

Android Google Maps set maxBounds

I am trying to restrict the user going beyond the specified city boundary. In leaflet I have achieved this with maxBounds property of map object or with setMaxBounds function by providing southwest & northeast points., this way it limits…
1
vote
1 answer

Searching Latlng inside Polygon is not precise

I am trying to check if map centre is inside a polygon or not. My code for creating mulitple polygons on map is this: for (int i = 0; i < Constant.arr_zone.size(); i++) { LatLngBounds.Builder builder = new LatLngBounds.Builder(); …
Vikas Mane
  • 789
  • 1
  • 6
  • 14
1
vote
2 answers

fillColor in Google Maps API polygon not working

I try to create a polygon to cover an area with these code: map.addPolygon(new PolygonOptions() .add(new LatLng(-7.542257, 110.446209), new LatLng(-7.557232, 110.420116), new LatLng(-7.580375, 110.400890), new LatLng(-7.592626,…
milstrike
  • 73
  • 1
  • 10
1
vote
1 answer

Convert Strings distance to double in Google map directions

Hello i would like to ask if its possible that the convert the Strings Distance by giving the google map directions and I will convert it to decimal point? DecimalFormat df = new DecimalFormat("#.##"); Log.e("DISTANCEHECKER", "" +…
Jude Bautista
  • 160
  • 1
  • 16
1
vote
0 answers

Fade animation in Google Map default tile

How to make fade animation when new new default tile loads? For eg: if zoomed in, how to fade out the previous tile (of low zoom) and fade in new tile(of high zoom)? Another eg: If a double tap on some position, it should fade out the tile and fade…
1
vote
1 answer

Generate .kml file in Android from GoogleMapsApiV2

I'm making a Google Maps Application which one of the functions is to generate maps from user traveled distance. I do this by adding PolyLines to my map fragment so the user can see the path he just traveled. However, after the user is done…
1
vote
1 answer

Google Maps Android API logging data only once

I am trying to use google maps api v2 to log the location of the user and store it into a SQLite db. I have managed to do this. But now the problem occurs as my location data is only being logged once. Once the user presses a button, the location is…
Richeek Dey
  • 257
  • 2
  • 15
1
vote
1 answer

Calculate Road Distance for an array of longitude and latitudes

I have an Android app which captures lat-longs every 15 seconds and we use this bunch of lat-longs to find road distance between origin and destination (first and last lat-long sorted by time stamp). Actually this app is for a client who runs mini…