itemizedoverlay

how to handle the visibility of the ItemizedOverlay in mapview in android?

i want set the visibility to itemized overlay in map view. if the zoom level is less than 10 i want to set visibility of overlay is GONE else VISIBLE. how to do that? and also cant set zoom level Listener. ...

Application stopped unexpectedly at launch

I've run this on a device and on the emulator. The app stops unexpectedly on both. I have not a clue what is wrong currently. It uses Google API Maps I compiled with Google Api 7. I followed this tutorial http://developer.android.com/guide/tutorials/views/hello-mapview.html (made some alterations clearly) I did use the correct API Ke...

Overlay only draws line between first 2 GPS points in Android

Hi, I am experiencing an unusual error using ItemizedOverlay in Android. I am creating a GPS tracking device that plots a route between waypoints stored in a database. When I provide the first two sets of longitude and latitude points through the emulator in Eclipse, it draws a red line just how I want it, but if I send another GPS p...

Performance of map overlay in conjunction with ItemizedOverlay is very poor

I am trying to display one png (drawable) on a map in about 300 points. I am retrieving the coordinates from a Sqlite table, dumping them in a cursor. When I try to display them by parsing through the cursor, it takes for ever for the images to be drawn, about .5 second per image. I find that to be suspiciously slow, so some insight on h...

Android mapView ItemizedOverlay setFocus does not work properly

Calling setFocus(null) on the ItemizedOverlay does not 'unfocus' current marker. According to the documentation: ... If the Item is not found, this is a no-op. You can also pass null to remove focus. Here's my code: MapItemizedOverlay public class MapItemizedOverlay extends ItemizedOverlay<OverlayItem> { private ArrayList<Ov...

Dynamic Overlays slowing down Google Maps (Android 2.1) on Nexus One

Hi, I'm trying to create a dynamic ItemizedOverylay (please see the code below) on Google Maps (Android 2.1) on a Nexus One. In my Activity (that extends MapActivity) I'm creating a data thread that is receiving data from the network. A 'handler' is used to communicate the data from the receiving thread to map activity. This data co...

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...

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 ...

Get current OverlayItem being drawn

I want to be able to get some reference to the curent object being drawn @Override public void draw(Canvas canvas, MapView mapView,boolean shadow) { //Log.i("DRAW","MARKER"); super.draw(canvas, mapView, false); } Above is my draw method and I want to extend the draw method to write the title und...

Android itemized overlay Array slowing down

Hi hi, I've got a script which gets data from a MySQL database through an http request, puts it into a json array, then puts each item into an itemized overlay array so that each item can be put onto a map. Problem is, it takes > 5 minutes to load all the items into the itemized overlay, and is then dog-slow at actually running. It sta...

Weird shadow behavior for android MapView

I am putting several markers on a MapView by subclassing an ItemizedOverlay. The hitch is that the marker I am passing to the ItemizedOverlay is a custom Drawable. That is to say, I've subclassed "Drawable" and I have overwritten the draw() method. The point of this was to add a color filter to the Drawable, and add custom text: publ...

Android map overlay icon with relative/fixed position to the screen

I am trying to have a drawable (basically an icon/button) that sits on the mapview with a fixed position at the corner of the map. Similar to the zoom controller, and unlike a typical marker, it shouldn't move when I pan the map. When I click on the icon it should bring up an activity. I am currently implementing it as an OverlayItem...

ItemizedOverlay seems to be drawing with a "broken" projection

I have a strange problem that I don't really know how to attack so I'm wondering if someone has had a similar problem before. I override the draw(Canvas canvas, MapView mapView, boolean shadow) method in an ItemizedOverlay subclass to draw some paths, text etc. between the items. The first thing I do in the override is call super.draw w...

Remove all Overlays

Hello, I have the following code to add an Overlay myMapView.getOverlays().add(sites); myMapView.invalidate(); I also have the following remove code where sites is a global variable. if (sites != null) { // myMapView.getOverlays().clear(); myMapView.getOverlays().remove(sites); myMapVi...

Android Mapping Overlay Question

I am developing an Android mapping application and I have managed to work Google's ItemizedOverlay tutorial into my code. I'm plotting my little circle on the map nicely. However, I would like to label my tiny symbol with its title -- all the time. I'm going to be dropping a few different symbols on my map and the able to display thei...

Increase Hit detection on ItemizedOverlay

Hello, I have an itemizedOverlay extended and I want to increase the hit detection on the OverLayItem's if this is possible? ...

Android ItemizedOverlay draw method question

Does anybody know the relationship between the members of an Android Itemized Overlay list and when draw() is called. Specifically, I'm trying to find out if draw is called once for each Overlay or once only for the whole set. Thanks, R. ...

Moving icons on a Android MapView

I'm working on an application that displays the location of moving items on a Google MapView. I need a way to update the position of the icons that represent the items (as well as change the facing of the icons every two seconds as updated data comes in). I currently have an activity in the app that extends MapActivity. On to this I hav...

How to implement SimpleOnGestureListener in Activity

This is primarily a design question. I've implemented SimpleOnGestureListener on an ItemizedOverlay because I wanted to catch the onLongPress event as well as the onDown and onTap events. Everything is working okay but now I need to transition to a new activity on a specific onLongPress event. In this particular case an alert dialog is i...

how to see two or more layout whit android?

hello i got a project that i need to add one or more layout to my existent layout. the problem is that i'm can saw just my last layout . i am using overlay's vector and i'm asure that is not the way to solve this problem i will glad that some one will give me some clue how to solve this problem thank you ...