[android-developers] Re: MapView Overlay problem

2011-07-02 Thread Felix Garcia Lainez
Ok thanks! I will take a look.. On 1 jul, 17:34, Kostya Vasilyev kmans...@gmail.com wrote: TraceView and dmtracedump: http://developer.android.com/guide/developing/debugging/debugging-tra... 01.07.2011 19:26, TreKing ?:     How should i profile this case? Really as i said there is

[android-developers] Re: MapView Overlay problem

2011-07-01 Thread Felix Garcia Lainez
Hi, So you are doing something similar to my draw method? I have just tested without alpha and anti-alising and it is faster, but when there is big zoom level the mapactivity is closed (i think this is due to memory usage) How should i profile this case? Really as i said there is not any

[android-developers] Re: MapView Overlay problem

2011-07-01 Thread Felix Garcia Lainez
Ok it sounds good... The problem is that i don't know what initial value to use for tolerance parameter... What would you recommend? 5 meters? Thanks! On 1 jul, 03:41, JP joachim.pfeif...@gmail.com wrote: I haven't had to use the Douglas-Peucker algorithm, but I understand others have so with

[android-developers] Re: MapView Overlay problem

2011-07-01 Thread JP
You could conceivably use a change in zoom level to drive the thinning of the poly lines, or other factors that help you determine the level of thinning. This is not trivial - you'll want to run the algorithm outside of your Overlay.draw() and probably not draw any lines until the algorithm has

[android-developers] Re: MapView Overlay problem

2011-07-01 Thread Felix Garcia Lainez
Ok thank you. I will try to see how they do this. On 1 jul, 15:49, JP joachim.pfeif...@gmail.com wrote: You could conceivably use a change in zoom level to drive the thinning of the poly lines, or other factors that help you determine the level of thinning. This is not trivial - you'll want to

Re: [android-developers] Re: MapView Overlay problem

2011-07-01 Thread TreKing
On Fri, Jul 1, 2011 at 4:00 AM, Felix Garcia Lainez fgarcialai...@gmail.com wrote: So you are doing something similar to my draw method? Yup - nearly identical. What I don't do is use anti-aliasing (unless it's on be default, I don't know) or alpha. I also only use moveTo() once (first point)

Re: [android-developers] Re: MapView Overlay problem

2011-07-01 Thread Kostya Vasilyev
TraceView and dmtracedump: http://developer.android.com/guide/developing/debugging/debugging-tracing.html 01.07.2011 19:26, TreKing ?: How should i profile this case? Really as i said there is not any strange thing on the code... Simply a map with an overlay... No idea. Look at

[android-developers] Re: MapView Overlay problem

2011-07-01 Thread Felix Garcia Lainez
I have improved the responsiveness using some of MyTrack approaches, but i am still getting this exception, simply doing zoom in and zoom out sometimes java.lang.OutOfMemoryError: bitmap size exceeds VM budget at android.graphics.Bitmap.nativeCreate(Native Method) at

Re: [android-developers] Re: MapView Overlay problem

2011-07-01 Thread TreKing
On Fri, Jul 1, 2011 at 11:29 AM, Felix Garcia Lainez fgarcialai...@gmail.com wrote: I have improved the responsiveness using some of MyTrack approaches, but i am still getting this exception, simply doing zoom in and zoom out sometimes I doubt there's much you can do about that - the

[android-developers] Re: MapView Overlay problem

2011-07-01 Thread JP
The stack trace does not include any calls to your code. I suspect it has to do with the loading of map tiles. Nothing you can do that I know of. I am seeing this for years now, but not at an alarming clip. How time flies... Anyway, it would be lovely to learn about this some more. Perhaps

Re: [android-developers] Re: MapView Overlay problem

2011-07-01 Thread TreKing
On Fri, Jul 1, 2011 at 12:26 PM, JP joachim.pfeif...@gmail.com wrote: As a side note, I never bothered to check, I'm sure this problem has a record in some issues database already, where you could push a button or star. As a matter of fact ...

[android-developers] Re: MapView Overlay problem

2011-06-30 Thread Felix Garcia Lainez
I use this code: public class PolylineOverlay extends Overlay { private ArrayListGeoPoint polyline; // Contains set of points to be connected. private Paint pathPaint = null; // Paint tool that is used to draw on the map canvas. public PolylineOverlay(ArrayListGeoPoint polyline,

Re: [android-developers] Re: MapView Overlay problem

2011-06-30 Thread TreKing
On Thu, Jun 30, 2011 at 5:47 PM, Felix Garcia Lainez fgarcialai...@gmail.com wrote: About the size with 300 or 400 GeoPoints i am already having problems... The method isOnePointVisible is an optimization i did in order to try to improve performance (seems to work fine). So I have a very

[android-developers] Re: MapView Overlay problem

2011-06-30 Thread JP
I haven't had to use the Douglas-Peucker algorithm, but I understand others have so with success. http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm This algorithm will thin out the number of poly lines. Apparently there's an open source implementation in the Android

Re: [android-developers] Re: MapView Overlay problem

2010-01-08 Thread TreKing
I'm still a bit confused on what you're doing, but I would suggest: 1 - Subclass ItemizedOverlay instead of Overlay to manage a collection of similar items at once. It maintains a list OverlayItems that represent each unique point on the map. In your case these would be the Track points you have.

[android-developers] Re: MapView Overlay problem

2010-01-06 Thread Stefan
On Jan 6, 4:57 am, Peter SSK sasikumar.it1...@gmail.com wrote: see this link http://www.androidpeople.com/category/google-map/ is that the right link? There i only see, how to display a Map. Thats not the problem. But perhaps i dont find the right part?! -- You received this message because

[android-developers] Re: MapView Overlay problem

2010-01-05 Thread Master_Ne0
I also had this problem, i had to save the overlay locations to the outstate bundle then add them again onResume. Couldn't figure a way to save my overlay class to bundle. Let me know if you find a better workaround. Ne0 On Jan 5, 11:59 am, Stefan ebay-dah...@web.de wrote: hello, i have an

[android-developers] Re: MapView Overlay problem

2010-01-05 Thread Stefan
On Jan 5, 1:16 pm, Master_Ne0 master.ne0s.soluti...@googlemail.com wrote: I also had this problem, i had to save the overlay locations to the outstate bundle then add them again onResume. Couldn't figure a way to save my overlay class to bundle. Let me know if you find a better workaround.

Re: [android-developers] Re: MapView Overlay problem

2010-01-05 Thread TreKing
Couldn't figure a way to save my overlay class to bundle Have your Overlay class implement the Parceable interface, which you can then save to / restore from a Bundle. - TreKing - Chicago transit

[android-developers] Re: MapView Overlay problem

2010-01-05 Thread Stefan
On Jan 5, 6:48 pm, TreKing treking...@gmail.com wrote: Couldn't figure a way to save my overlay class to bundle Have your Overlay class implement the Parceable interface, which you can then save to / restore from a Bundle. hmmm, in my case i have always a new overlay for each line on my

Re: [android-developers] Re: MapView Overlay problem

2010-01-05 Thread TreKing
I'm sorry, but I'm not really following or understanding what you're doing. Could you clarify or post some sample code? - TreKing - Chicago transit tracking app for Android-powered devices

[android-developers] Re: MapView Overlay problem

2010-01-05 Thread Stefan
Ok, i try it :) 1. I track gps points in my app and draw my route on a MapView: @Override public void onLocationChanged(Location loc) { if (loc != null) { latitude = loc.getLatitude(); longitude = loc.getLongitude(); if(first)

Re: [android-developers] Re: MapView Overlay problem

2010-01-05 Thread TreKing
OK, well your main problem is that while you implemented the Parcelable class, you didn't implement the writeToParcel method or the constructor that takes a Parcel. That's the key. You need to implement the first method to save all you state information (i.e., your member variables) to the Parcel

[android-developers] Re: MapView Overlay problem

2010-01-05 Thread Stefan
hi, thanks for your answer :) On Jan 5, 11:30 pm, TreKing treking...@gmail.com wrote: OK, well your main problem is that while you implemented the Parcelable class, you didn't implement the writeToParcel method or the constructor that takes a Parcel. That's the key. in one other class of my

[android-developers] Re: MapView Overlay problem

2010-01-05 Thread Peter SSK
see this link http://www.androidpeople.com/category/google-map/ On Jan 5, 4:59 pm, Stefan ebay-dah...@web.de wrote: hello, i have an activity with a MapView ad overlays. If i start a new activity and go back to my Activity with the map, i only see the map without my overlays. How can i