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 - Drawing item after added to the Overlay

Drawing item after added to the Overlay

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

Drawing item after added to the Overlay

Postby ghostava » Sun Oct 13, 2013 1:01 pm

Hi,
I use the OSMdroid. I want to implement my own overlay the MyOwnOverlayItem by extending the Overlay form the org.osmdroid.view.overlay package.

Here is my code:

Code: Select all
public class MyOwnItemizedOverlay extends Overlay {

   public MyOwnItemizedOverlay(Context ctx) {
      super(ctx);
      // TODO Auto-generated constructor stub
   }

   private Canvas mCanvas;
   private MapView mapView;
   
   
   protected void draw(final Canvas c, final MapView osmv, final boolean shadow) {
      if(shadow) {
         if(mCanvas == null) {
            mCanvas = c;
         }
         
         if(mapView == null) {
            mapView = osmv;
         }
      }
   }
   
   public  void add(MyOwnOverlayItem item) {
      
      final Point point = new Point();
      
      mapView.getProjection().toMapPixels(item.getGeoPoint(), point);
      
      mCanvas.drawBitmap(((BitmapDrawable)item.getMarker()).getBitmap(),
                                                (float)point.x, (float)point.y, null);
   }
}


And I receive the NullPointerException at android.view.GLES20RecordingCanvas.drawBitmap(GLES20RecordingCanvas.java:104)

I do not know how to deal with it. Any suggestions ?
Thank in advance.
ghostava
Once Poster
Once Poster
 
Posts: 1
Joined: Sun Oct 13, 2013 11:04 am

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 4 guests