mapview

Zoom events that work in an android Mapview

I need to redraw the overlay after the user zooms. What is the best way to do this? I've tried everything I can think of (saving a getZoomLevel() state, overriding onUserInteraction()), nothing actually works. The problem is, that draw() is being called when the user clicks zoom, so the information my draw method gets (About the map's st...

Determining where to animate the map given a list of GeoPoints

My android application loads some markers on an overlay onto a MapView. The markers are placed based on a dynamic list of GeoPoints. I want to move the map center and zoom into the area with most items. Naively, I can calculate the superposition of all the points, but I would like to remove the points that are very far from the mass of p...

Calculating zoomToSpan() degrees based on min/max lat/lng to be in the mapView

I have a cluster of items on an overlay in a mapView. I know where the top/bottom/left/right most objects are. I want to use the zoomToSpan() method to zoom onto that area. What is the proper way to calculate the lat/lng degrees for this method ? ...

MapView tile coordinates

Is it possible to determine the coordinates of the tiles that are visible in a MapView, relative to the first tile in the upper left corner of the entire map (including the invisible part)? I can't seem to find a way to get the tile coordinates ... ...

Android 2.1 GoogleMaps ItemizedOverlay ConcurrentModificationException

Hi, I cannot figure out the origin of the ConcurrentModificationException. In my activity I'm calling updateMapOverlay(). I'm also calling updateMapOverlay() inside another Thread (a TimerTask) that is invoked on regular intervals. I'm taking the appropriate locks when invoking updateMapOverlay() from both the threads. Is this proble...

ipad dev - user direction (orientation) in mapkit

In the google maps app in iPad, when the user taps twice on the "locateMe" toolbar button, the map shows the user's direction (I mean orientation, whether facing east, west, south, or north). Is that available in the sdk 3.2? how would I do that with a mapview? ...

How do I update an MKAnnotation location with new coordinates?

Hi everyone, i'm having problems trying to update an annotation location with different coordinates. Is there any way I can change de location property without having to create another annotation? I've tried the code below with no luck. The annotation i'm trying to get is not updating its location. Please help! CLLocationCoordinate2D lo...

Android MapView: Disable auto zoom

Hi. I have made an Android app that shows a MapView with two overlays, one MyLocationOverlay and one custom overlay. I am programmatically zooming and panning to what I want the map to show. It also auto pans to my current location. The auto pan is moving the map away from what I want to show. So my question is simply: How can I disabl...

Stepping through KML Files with DDMS

Successfully loaded a KML file into the DDMS Emulator Tab, which shows up as a series of Latitude and Longitude coordinates in the Location Controls window. Is there a way to step through each Placemark, vs. having the entire series play automatically? There are forward and back buttons on the Location Controls window, but no documentati...

Android - MapView contained within a Listview

Hello, Currently I am trying to place a MapView within a ListView. Has anyone had any success with this? Is it even possible? Here is my code: ListView myList = (ListView) findViewById(android.R.id.list); List<Map<String, Object>> groupData = new ArrayList<Map<String, Object>>(); Map<String, Object> curG...

MapView: application crash on launched

Hello, I'm trying to display a map using that rotates according to the phone's orientation. I have rewrite a part of the google sample to use a SensorEventListner instead of a SensorListener. My Problem is when I try to use the findViewByID() method to display the map my application crashes on start. If I use MapView(Context, String) to...

How to persist options selected in AlertDialog spawned from ItemizedOverlay onTap method

In the description of how to add a list of options to an AlertDialog the official Android documentation alludes to saving a users preferences with one of the "data storage techniques." The examples assume the AlertDialog has been spawned within an Activity class. In my case I've created a class that extends ItemizedOverlay. This class ...

Android: automatically choose debug/release Maps api key?

Is it possible to automatically detect, which certificate was used for signing APK? I'd like to have both debug and release Maps certificates in application and pass valid one to MapView constructor. With such setup I will not make mistake while releasing application - I'm using debug certificate on emulator and my device, then sign wit...

Android - drawing path as overlay on MapView

Hello, I have a class that extends Overlay and implemments Overlay.Snappable. I have overriden its draw method: @Override public void draw(Canvas canvas, MapView mv, boolean shadow) { Projection projection = mv.getProjection(); ArrayList<GeoPoint> geoPoints = new ArrayList<GeoPoint>(); //Creating geopoints - ommited for read...

Consequences of isRouteDisplayed() on map view

Hi guys, I'm just wondering what consequences the method isRouteDisplayed() has, regarding to functionality of a map view... I have two activities, one displays a route and one doesn't. Is it mandatory to let the first isRouteDisplayed()-Method return true? What effects does it have? greets, poeschlorn ...

Performance issue on Android's MapView Navigation-App

Hey Guys, I've got a question on making an navigation app more faster and more stable. The basic layer of my app is a simple mapview, covered with several overlays (2 markers for start and destination and one for the route). My idea is to implement a thread to display the route, so that the app won't hang up during the calculation of ...

is this Map API key Problem in Android?

Hi folks, I am using 2 map Activities. do i want to register multiple Map APi key for each? Now I am getting this exception: 06-16 18:49:41.498: INFO/MapActivity(11067): Handling network change notification:CONNECTED 06-16 18:49:41.498: ERROR/MapActivity(11067): Couldn't get connection factory client I googled about this exception. I...

Lazy loading in map view ??

I have to show large set of location records in tableview and mapview depends on user switching between views. How lazy loading can be implemented?. I don't want query central server for location for even small change in location. ...

Android 1.6 Mapview doesn't show traffic until user interacts with the map

I have a MapActivity. If it's set to an appropriate location and zoom level to see traffic none is shown after it's first created until you interact with the map (click on it, drag, etc) at which point traffic shows up. Naturally I want traffic to show up without any user interaction after it loads but I've been unable to figure out how ...

[Android] MapView ConcurrentModificationException

Hello everyone, As the title suggest i have (sometimes) a concurrentmodificationexception while trying to create a route between two locations ... Here is my code (and in case you're wondering MyOverlay does not try to access the other Overlays in the map) private class fillRouteTask extends AsyncTask<Void, GeoPoint, Void> { /**...