android-maps

ActionBarSherlock + Maps + Loaders = java.lang.NoClassDefFoundError

放肆的年华 提交于 2019-11-29 04:17:27
Edit: For a detailed how-to, check out my answer . I'm struggling with it for two days now, hope someone can help. I'm trying to use the newest ActionBarSherlock (4.0) with a MapView. I knew it's problematic with fragments, but I don't need them in this activity. But I need Loaders and it appears, that to use Loaders I have to extend the FragmentActivity too. No problem, I thought, we have the android-support-v4-googlemaps from Pete Doyle. As suggested on many SO threads and Google Groups I build the ABS with android-support-v4-googlemaps JAR (android-support-v13-r7-googlemaps.jar actually)

Map display with release key in android

穿精又带淫゛_ 提交于 2019-11-29 02:45:45
I've created Release key for my application.But It doesnt show map.What did i wrong on that?i've created release key by Right click of project->Export->Giving alias_name->...like that.Then by the use of Keytool.,i got that release key.i used it on my xml. My code: public class SampleMapActivity extends MapActivity { MapView myMapView = null; MapController myMC = null; GeoPoint geoPoint = null; double latitude = 12.937875, longitude = 77.622313; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

Handling multiple geofences transition with common area

为君一笑 提交于 2019-11-29 02:24:06
问题 If I have these two geofences, after registering these geofences I should get notified when I'm entering or exiting the circumference of these circles. However, I don't want my App to send a notification if I'm moving through the common area, i.e. from once circle to another. Is it possible? If so, then how? 回答1: You will have to use a class for monitoring your fencing: public class GeofenceReceiver extends BroadcastReceiver { Context context; Intent broadcastIntent = new Intent(); @Override

Associate an object with Marker (google map v2)

吃可爱长大的小学妹 提交于 2019-11-28 20:56:40
问题 In my app I have some objects that have their location displayed on the map using markers. The problem is that the only way I've found to handle marker clicks is googleMap.setOnMarkerClickListener(new ... { @Override public void onMarkerClick(Marker marker) { // how to get the object associated to marker??? } }) In other words I get the Marker object while the only interface that I have allows me to set just MarkerOptions. Any way to associate Marker with an object? 回答1: You can associate

Adding Overlay to OSMDROID

∥☆過路亽.° 提交于 2019-11-28 19:43:48
I have been struggling with this long time. I am trying to add Overlay on my map. I am using the open source OSMdroid. but all I get by the example is a straight red line from one corner to another. My target is to add some icon where my geoPoint is set. here is my code: package osmdemo.demo; import java.util.List; import microsoft.mappoint.TileSystem; import org.osmdroid.tileprovider.tilesource.TileSourceFactory; import org.osmdroid.util.GeoPoint; import org.osmdroid.views.MapController; import org.osmdroid.views.MapView; import org.osmdroid.views.MapView.Projection; import org.osmdroid.views

Zoom on current user location displayed

别说谁变了你拦得住时间么 提交于 2019-11-28 11:42:53
问题 I'm using the Google Maps for Android v2. I would like to display the current user location and zoom on it. Here is the code in the FragmentActivity : @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map_activity); mMap = ((SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.mapFragment_mapActivity)).getMap(); if (mMap == null) { Toast.makeText(this, R.string.mapCreationProblem, Toast.LENGTH_LONG)

Google Maps API v2: How to make markers non-clickable?

爱⌒轻易说出口 提交于 2019-11-28 11:17:34
I mean if i click marker OnMarkerClickListener is called, so the OnMapClickListener did not. Even if i set mMap.setOnMarkerClickListener(null); marker object still masks all click events for underlying map and objects. How can i set Marker transparent for all user interractions? This is indeed a "limitation" of markers as of 3.1.59 version of the library. If you really need them to be markers, please post a feature request on gmaps-api-issues for MarkerOptions.clickable and Marker.setClickable . If you can, consider using other visual objects, e.g. GroundOverlay . The only problem is they all

Google Maps works fine on Android but I still get an error “Could not find class 'maps.i.k', referenced from method maps.z.ag.a”

拈花ヽ惹草 提交于 2019-11-28 10:52:07
I got Google Maps Android API v2 to work perfectly on my Android Application by downloading the library, adding it to workspace, then referencing it as a library. But I still get this error as soon as the activity containing the Map Fragment starts Could not find class 'maps.i.k', referenced from method maps.z.ag.a By the way I'm using support map fragment This error does not seem to affect me in anyway nor crash the application nor anything, should I bother fixing it ? Added the manifest P.S E_SelectJourney is where I display and use the map <?xml version="1.0" encoding="utf-8"?> <manifest

Draw driving route between 2 GeoPoints on GoogleMap SupportMapFragment

為{幸葍}努か 提交于 2019-11-28 09:33:26
This is a tricky question, been banging my head for a day, please help. I use Google Maps Apis to get the shortest driving distance and its routes, points, etc between 2 GeoPoints that I provide, see code below private JSONObject GetDistance(String src, String dest) throws Exception { StringBuilder urlString = new StringBuilder(); urlString.append("http://maps.googleapis.com/maps/api/directions/json?"); urlString.append("origin=");// from urlString.append(src); urlString.append("&destination=");// to urlString.append(dest); urlString.append("&mode=driving&sensor=true&units=imperial"); // get

image not loading from URL in custom infoWindow using Picasso image loading library in android

不羁的心 提交于 2019-11-28 08:44:55
I am trying to load an image from the URL in custom infoWindow when the user click on the marker. I was able to load the other details but the image is not loading int it. i'm using Picasso library to do this for me. I have search many related topics and see the solutions but was not able to understand which solution to apply to solve my problem. I am using an web service call to get the required data. This is my code: @Override public View getInfoContents(Marker arg0) { //marker.showInfoWindow(); return null; } @Override public View getInfoWindow(Marker arg0) { View v = getLayoutInflater()