Tag: google-maps

Google Maps Android — Map suddenly no longer displayed

I’m working on integrating Google Maps into the app I’m working on and I’ve had a rather unpleasant time doing it thus far. Regardless, I finally got a SupportMapFragment displaying a map and set a location and zoom level. Here is the functional bits of my code thus far: @Override public void onActivityCreated( Bundle savedInstanceState […]

knowing when map has stopped scrolling (like “moveend” in javascript API)

I need to detect when a MapView has been scrolled or zoomed, like the “moveend” event in the javascript API. I’d like to wait until the view has stopped moving, so I can then detect if I need to query my server for items withing the viewing rectangle, and if so send out a request. […]

How to set my own icon for markers in clusterer in Google Maps

I’m using GoogleMaps clustering. I have 4 different types of markers, each extends from one abstract class, each has its owm icon and it defined in MarkerOptions field. I use ClusterManager for this abstract class. When I just use //marker is instance of one of extended classes and has abstract class type clusterManager.addItem(marker); After clustering […]

How to get Google Maps object inside a Fragment

I am using fragments in my application and I am new for this. There is a fragment in which I want to display Google Map and want to get its object, for this I have a fragment in my XML and I want to inflate it in the Fragment itself. When I am trying to […]

How to get click event of the marker text

I am displaying google map api v2 in my app. I have set some markers in the map. I have also set title and snippet on the markers which are shown when you click the marker. Now I want to call a new activity when clicked on the marker’s title and not on marker itself. […]

Getting a map marker by its ID in Google Maps v2

basically when adding a marker to the map it returns the new marker and you can gets the marker id from it like so Marker m = map.addMarker(new MarkerOptions() .position(new LatLng(lat,lon))); String id = m.getId(); is there a way to get a marker by its id if there are many markers and you just want […]

Android – activity_main cannot be resolved or is not a field

Previous people have had the same error message, but the solution has always been to remove or modify some import “android.R”. I have no such import so I’m really lost I’m trying to get a sample android google maps program running. I’m following this tutorial. http://www.vogella.com/articles/AndroidGoogleMaps/article.html However, eclipse gives me this error when I paste […]

Google maps api v2 – The type android.app.Fragment cannot be resolved. It is indirectly referenced from required .class files

I’ve found a few questions on this subject here but their answers do not seem to apply being that my project is referencing the library that contains the class. Here’s my code: package com.demo.app; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.support.v4.view.ViewPager; 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.SupportMapFragment; import […]

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). icon(BitmapDescriptorFactory.fromBitmap(aUserImage)) .snippet(My_VALUE_1) .title(My_VALUE_2) .hideInfoWindow(); I have several markers and assigned few values (My_VALUE_1 and My_VALUE_2) to each marker’s snippet and title. When user clicks a marker, I need […]

MarkerClick works but InfoWindowClick does not open ViewModel

The following MarkerClick implementation works, perfectly fine. I could able to open other View via ShowViewModel View.cs mMap.MarkerClick += MMap_MarkerClick; private void MMap_MarkerClick(object sender, GoogleMap.MarkerClickEventArgs e) { ViewModel.MapInfoSelected(e.Marker.Title); } ViewModel.cs public void MapInfoSelected(string name) { ShowViewModel<StudentViewModel>(new { studentName = name}); } InfoWindowClick does not trigger to open other View. View.cs mMap.InfoWindowClick += MMap_InfoWindowClick; private void […]

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