Hi, thanks for your answer. i first try it with the getLatitudeSpan and so on and check, if this point is visible or not. this works fine in the most cases. it also works, if i touch (ACTION_DOWN) the map with my thumb, move the map (ACTION_MOVE), and leave the thumb from the map (ACTION_UP). But if i scroll the map very fast, the map continue "scrolling" after ACTION_UP. So how can i detect, if the map has a new Map center for example?
Another solution could be, that i transmit the gps points to my overlay class, check whether the point is visible and draw the line (because every time the map position chages, the draw method will be called)? In the thread mentioned above i read, that it is more efficient to draw the lines into a bitmap and than draw the bitmap instead of use the canvas.drawLine function. Means that, that i use ONE bitmap for all lines or must i create a bitmap for each line? I dont find a nice tutorial for that and i have a mental block now... how would the code looks like? : class MyOverlay extends Overlay { //List of my gps points; MyOverlay(gpspoints) { ..... } @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { Canvas can = new Canvas (); //i have read that some times the canvas has height=0 and width=0 at the beginning??) bitmap = Bitmap.createBitmap(canvas.getWidth(), canvas.getHeight(), Bitmap.Config.ARGB_8888); can.setBitmap(bitmap); iterate through the list and check, whether point is visible or not { if(visible) //how to add a line to that bitmap?? can.drawLine??? } //how to draw the bitmap?? } } or can i add all gps points (no check, if gps point is visible) into the bitmap and the perfomance is still fast?? Thanks again, Stefan -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en