Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Rotate MapView

Rotate MapView

Problems with Canvas, OpenGL, etc...

Rotate MapView

Postby harmjanr » Thu Jun 09, 2011 9:49 am

Hi,

I made a custom View: MyMapView which extends MapView. When I press a button from my app, I want to rotate the mapView. So I made a method onDraw with @Override annotation. I set a breakpoint in the onDraw method. When I press the button of the app, the breakpoint is hit and the map rotates. But when I press continue in the debugger, the breakpoint hits again and the map rotates back. Do I miss something in my code..??

My onDraw code:
Code: Select all
public void onDraw(Canvas canvas){
     super.onDraw(canvas);
     if(polyLine != null){
          canvas.rotate(45f, centerX, centerY);
     }
     polyLine = null;
}


The invalidate code when I hit the button:
Code: Select all
mapView.setPolyLine(polyLine);
mapView.invalidate();


The first time that the breakpoint is hit, polyLine != null. The second time, polyLine is null.
I deleted some code in the onDraw method, to make my problem more clear. So polyLine is actually used in the if(), but not shown here :)

Please help.
harmjanr
Freshman
Freshman
 
Posts: 6
Joined: Thu Apr 14, 2011 8:55 am

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 3 guests