0.9 and overlay not displayed !

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

0.9 and overlay not displayed !

Postby xirgonium » Sun Aug 24, 2008 7:54 pm

Hi,

in my app I need an overlay on a mapview. Before the 0.9 everything were working fine and now my app is broken because I can't succeed in displaying the overlay !!

My custom components are in the method called draw() of the Overlay. This method is never called because I have a specific log that is never written in Logcat

I add the overlay thanks to the method :
mapView.getOverlays().add(myCustomOverlay);

Does anyone meet the same issue ? Or does anyone have a working overlay on the new SDK ?

(even documentation link are highly appreciated ! :o )

Thanks for your help !

Rgds,

C.
xirgonium
Junior Developer
Junior Developer
 
Posts: 10
Joined: Thu Apr 10, 2008 6:17 pm

Top

Postby xirgonium » Mon Aug 25, 2008 1:48 pm

Hello,

it was a simple issu with the "draw" method parameters that changed between 0.9 and the previous SDK.

:roll:
xirgonium
Junior Developer
Junior Developer
 
Posts: 10
Joined: Thu Apr 10, 2008 6:17 pm

Postby phannguyen » Fri Oct 03, 2008 10:03 am

i think it differ at draw function
now in SDK 1.0 using:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public void draw(Canvas canvas, MapView mview, boolean shadow)
Parsed in 0.030 seconds, using GeSHi 1.0.8.4

and mview.getProjection() instead of PixelCalculator.
PhanNguyen
phannguyen
Experienced Developer
Experienced Developer
 
Posts: 56
Joined: Thu Jul 17, 2008 7:37 am

Re: 0.9 and overlay not displayed !

Postby William Wen » Sat Oct 04, 2008 8:20 pm

xirgonium wrote:Hi,

in my app I need an overlay on a mapview. Before the 0.9 everything were working fine and now my app is broken because I can't succeed in displaying the overlay !!

My custom components are in the method called draw() of the Overlay. This method is never called because I have a specific log that is never written in Logcat

I add the overlay thanks to the method :
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. mapView.getOverlays().add(myCustomOverlay);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Does anyone meet the same issue ? Or does anyone have a working overlay on the new SDK ?

(even documentation link are highly appreciated ! :o )

Thanks for your help !

Rgds,

C.


Maybe, issue derived from Canvas. You'd better set a bitmap for the Canvas to draw like the following:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.         bm1 = Bitmap.createBitmap(200, 200, Bitmap.Config.ALPHA_8);
  2.  
  3.         Canvas cv = new Canvas();
  4.         cv.setBitmap(bm1);
  5.  
Parsed in 0.035 seconds, using GeSHi 1.0.8.4

Hava a try...
William Wen
William Wen
Junior Developer
Junior Developer
 
Posts: 11
Joined: Tue Sep 23, 2008 4:28 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 4 guests