@Override
	public void draw(final Canvas canvas, final Projection pj) {
		if (mPendingFocusChangedEvent && mOnFocusChangeListener != null)
			mOnFocusChangeListener.onFocusChanged(this, mFocusedItem);
		mPendingFocusChangedEvent = false;

		final int size = Math.min(this.mInternalItemList.size(), mDrawnItemsLimit);

		if (mInternalItemDisplayedList == null || mInternalItemDisplayedList.length != size) {
			mInternalItemDisplayedList = new boolean[size];
		}

		/* Draw in backward cycle, so the items with the least index are on the front. */
		for (int i = size - 1; i >= 0; i--) {
			final Item item = getItem(i);
			if (item == null) {
				continue;
			}

            pj.toPixels(item.getPoint(), mCurScreenCoords);
			calculateItemRect(item, mCurScreenCoords, itemRect);

			mInternalItemDisplayedList[i] = onDrawItem(canvas,item, mCurScreenCoords, pj);
        }
    }
@ Override public void draw ( final Canvas canvas , final Projection pj ) { if ( mPendingFocusChangedEvent && mOnFocusChangeListener != null ) mOnFocusChangeListener . onFocusChanged ( this , mFocusedItem ) ; mPendingFocusChangedEvent = false ; final int size = Math . min ( this . mInternalItemList . size ( ) , mDrawnItemsLimit ) ; if ( mInternalItemDisplayedList == null || mInternalItemDisplayedList . length != size ) { mInternalItemDisplayedList = new boolean [ size ] ; } for ( int i = size - 1 ; i >= 0 ; i -- ) { final Item item = getItem ( i ) ; if ( item == null ) { continue ; } pj . toPixels ( item . getPoint ( ) , mCurScreenCoords ) ; calculateItemRect ( item , mCurScreenCoords , itemRect ) ; mInternalItemDisplayedList [ i ] = onDrawItem ( canvas , item , mCurScreenCoords , pj ) ; } }
Draw a marker on each of our items. populate() must have been called first.<br>
<br>
The marker will be drawn twice for each Item in the Overlay--once in the shadow phase, skewed
and darkened, then again in the non-shadow phase. The bottom-center of the marker will be
aligned with the geographical coordinates of the Item.<br>
<br>
The order of drawing may be changed by overriding the getIndexToDraw(int) method. An item may
provide an alternate marker via its OverlayItem.getMarker(int) method. If that method returns
null, the default marker is used.<br>
<br>
The focused item is always drawn last, which puts it visually on top of the other items.<br>