Вопрос по android – Добавление ItemizedOverlay к моему просмотру карты

2

Error: User Rate Limit Exceeded

this.mMyLocationOverlay = new ItemizedOverlay<OverlayItem>(this, items,
                new ItemizedOverlay.OnItemGestureListener<OverlayItem>() {
                    @Override
                    public boolean onItemSingleTapUp(final int index, final OverlayItem item) {
                        Toast.makeText(
                                SampleWithMinimapItemizedoverlay.this,
                                "Item '" + item.mTitle + "' (index=" + index
                                        + ") got single tapped up", Toast.LENGTH_LONG).show();
                        return true; // We 'handled' this event.
                    }

                    @Override
                    public boolean onItemLongPress(final int index, final OverlayItem item) {
                        Toast.makeText(
                                SampleWithMinimapItemizedoverlay.this,
                                "Item '" + item.mTitle + "' (index=" + index
                                        + ") got long pressed", Toast.LENGTH_LONG).show();
                        return false;
                    }
                }, mResourceProxy);

...

но в строке 2 под & quot; новым ItemizedOverlay.OnItemGestureListener & quot; я получаю красную линию и ошибку, которая говорит исправить настройки проекта. Я очень смущен. почему я получаю эту ошибку в затмении? Помогите мне, пожалуйста

Ваш Ответ

2   ответа
-1

Error: User Rate Limit Exceeded aTa
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded aTa
3

Error: User Rate Limit Exceeded

package dispatch.driver.osmMaps;

import java.util.ArrayList;

import org.osmdroid.ResourceProxy;
import org.osmdroid.api.IMapView;
import org.osmdroid.views.overlay.ItemizedIconOverlay;
import org.osmdroid.views.overlay.OverlayItem;

import android.graphics.Point;

public class OsmMapsItemizedOverlay extends ItemizedIconOverlay<OverlayItem>
{
    private ArrayList<OverlayItem> mItemList = new ArrayList<OverlayItem>();

    public OsmMapsItemizedOverlay(ArrayList<OverlayItem> pList,
            ItemizedIconOverlay.OnItemGestureListener<OverlayItem> pOnItemGestureListener, ResourceProxy pResourceProxy)
    {
        super(pList, pOnItemGestureListener, pResourceProxy);
        mItemList = pList;
        // TODO Auto-generated constructor stub
    }

    public void addOverlay(OverlayItem aOverlayItem)
    {
        mItemList.add(aOverlayItem);
        populate();
    }

    public void removeOverlay(OverlayItem aOverlayItem)
    {
        mItemList.remove(aOverlayItem);
        populate();
    }

    @Override
    protected OverlayItem createItem(int i)
    {
        return mItemList.get(i);
    }

    @Override
    public int size()
    {
        if (mItemList != null)
            return mItemList.size();
        else
            return 0;
    }

    @Override
    public boolean onSnapToItem(int arg0, int arg1, Point arg2, IMapView arg3)
    {
        // TODO Auto-generated method stub
        return false;
    }

}

Error: User Rate Limit Exceeded

private void PrepareItemizedOverlay()
    {
        /* itemized overlay */
        mItemizedOverlay = new OsmMapsItemizedOverlay(mItems,
                new ItemizedIconOverlay.OnItemGestureListener<OverlayItem>()
                {
                    @Override
                    public boolean onItemSingleTapUp(final int index, final OverlayItem item)
                    {

                        Toast.makeText(OsmMapsActivity.this,
                                "Item '" + item.mTitle + "' (index=" + index + ") got single tapped up",
                                Toast.LENGTH_LONG).show();

                        return true; // We 'handled' this event.
                    }

                    @Override
                    public boolean onItemLongPress(final int index, final OverlayItem item)
                    {

                        Toast.makeText(OsmMapsActivity.this,
                                "Item '" + item.mTitle + "' (index=" + index + ") got long pressed", Toast.LENGTH_LONG)
                                .show();

                        return true;
                    }
                }, mResourceProxy);
    }

Error: User Rate Limit Exceeded

{    OverlayItem overlayItem;


            overlayItem = new OverlayItem("Center", "Center", (GeoPoint) aPoint);



            mItemizedOverlay.addOverlay(overlayItem);

            mMapView.getOverlays().clear();
            mMapView.getOverlays().add(mItemizedOverlay);
            mMapView.getController().animateTo(aPoint);
}
Error: User Rate Limit Exceeded aTa

Похожие вопросы