draw() method is not being called in GMaps Overlay Method

My draw() method in a custom overlay class that extends LazyMarker from the Google Maps extension library is not being called and I'm not sure why. Here is my method:

@Override
public void draw(Canvas canvas, GoogleMap mapView, boolean shadow)
{
  Log.e("SegmentOverlay2", "Shadow Value:"+shadow);
  super.draw( canvas, mapView, shadow );
  if( !shadow )
  {
     Log.e("SegementOverlay2", "Projection VALUE SEGMENTOVERLAY2: "+mapView.getProjection());
     mProjectionProxy.setProjection( mapView.getProjection() ); 
     draw(canvas);
  }
}

I'm currently using GMaps V2. What is wrong with my code? This this the correct way to do this?

Answers


You seem to be mixing Android API v1 and v2. If you had an application that used API v1, you cannot just replace MapView with GoogleMap and think it will work.

The easiest way to migrate is to remove all the code that used API v1 and write it from scratch using these directions: https://developers.google.com/maps/documentation/android/start

Android Maps Extensions has API that extends API from Google Maps Android v2 and will not help you in migration either.


Need Your Help

InfoWindow close() function is not working

google-maps google-maps-api-3 maps infowindow

I am trying to manage an arrray of InfoWindow objects from the Google Maps JavaScript API v3. My array is defined as global so I can manage all the Infowindow objects like this:

HTTP PUT Request limit

rest http post put restangular

I am designing a RESTful API when I noticed something strange.