Search code examples
androidmapquest

Turn off shadow for DefaultItemizedOverlay


I'm working with the MapQuest Android API and I'm using a DefaultItemizedOverlay to show a marker (OverlayItem). Unfortunately the marker is drawn on with a shadow... how can I remove this shadow or stop it from being drawn?

Image

I know I could create a custom class and override the draw method from Overlay but I was hoping there was a more elegant solution.


Solution

  • MY SOLUTION

    In the end, I had to create my own custom overlay and override the draw method:

    @Override
    public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) {
        return super.draw(canvas, mapView, false, when);
    }
    

    Not the solution I wanted but the one I needed right now.