当前位置: 首页>>代码示例>>Java>>正文


Java Marker.remove方法代码示例

本文整理汇总了Java中com.amap.api.maps.model.Marker.remove方法的典型用法代码示例。如果您正苦于以下问题:Java Marker.remove方法的具体用法?Java Marker.remove怎么用?Java Marker.remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.amap.api.maps.model.Marker的用法示例。


在下文中一共展示了Marker.remove方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onDestroy

import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
/**
 * 在不适用此Overlay功能时,以及onDestroy的生命周期里,调用此方法,回收相关资源,避免内存泄漏
 */
public void onDestroy() {

    for (RankEntity rankEntity : mRankEntities) {

        Marker marker = rankEntity.getMarker();
        if (marker != null) {
            marker.remove();
            marker.destroy();
        }

    }
    mRankEntities.clear();
    mBitmapCache.evictAll();


}
 
开发者ID:amap-demo,项目名称:android-collision-marker,代码行数:20,代码来源:RankerOverlay.java

示例2: onDestroy

import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
public void onDestroy() {
    mIsCanceled = true;
    mSignClusterHandler.removeCallbacksAndMessages(null);
    mMarkerhandler.removeCallbacksAndMessages(null);
    mSignClusterThread.quit();
    mMarkerHandlerThread.quit();
    for (Marker marker : mAddMarkers) {
        marker.remove();

    }
    mAddMarkers.clear();
    mLruCache.evictAll();
}
 
开发者ID:sherlockchou86,项目名称:yphoto,代码行数:14,代码来源:ClusterOverlay.java

示例3: onAnimationEnd

import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
@Override
public void onAnimationEnd() {
    for(Marker marker:mRemoveMarkers){
        marker.remove();
    }
    mRemoveMarkers.clear();
}
 
开发者ID:sherlockchou86,项目名称:yphoto,代码行数:8,代码来源:ClusterOverlay.java

示例4: resetRankEntities

import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
public void resetRankEntities(List<RankEntity>rankEntities){
    for (RankEntity rankEntity : mRankEntities) {

        Marker marker = rankEntity.getMarker();
        if (marker != null) {
            marker.remove();
            marker.destroy();
        }

    }
    mRankEntities.clear();
    mRankEntities=rankEntities;
    generateAll();

}
 
开发者ID:amap-demo,项目名称:android-collision-marker,代码行数:16,代码来源:RankerOverlay.java

示例5: removeMarkers

import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
/**
 * 移除marker
 */
public static void removeMarkers() {
	for(Marker marker:markers){
		marker.remove();
		marker.destroy();
	}
	markers.clear();
}
 
开发者ID:larrySmile02,项目名称:MultipleViewMap,代码行数:11,代码来源:Utils.java

示例6: onDestroy

import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
public void onDestroy() {
    mIsCanceled = true;
    mSignClusterHandler.removeCallbacksAndMessages(null);
    mMarkerhandler.removeCallbacksAndMessages(null);
    mSignClusterThread.quit();
    mMarkerHandlerThread.quit();
    for (Marker marker : mAddMarkers) {
        marker.remove();
    }
    mAddMarkers.clear();
    mLruCache.evictAll();
}
 
开发者ID:xiaogu-space,项目名称:android-cluster-marker-master,代码行数:13,代码来源:ClusterOverlay.java

示例7: onAnimationEnd

import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
@Override
public void onAnimationEnd() {
    for (Marker marker : mRemoveMarkers) {
        marker.remove();
    }
    mRemoveMarkers.clear();
}
 
开发者ID:xiaogu-space,项目名称:android-cluster-marker-master,代码行数:8,代码来源:ClusterOverlay.java

示例8: removeMarkers

import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
private void removeMarkers() {
	if(null != centerMarker){
		centerMarker.remove();
		centerMarker = null;
	}
	if (null != markerList && markerList.size() > 0) {
		for (Marker marker : markerList) {
			marker.remove();
		}
		markerList.clear();
	}
}
 
开发者ID:amapapi,项目名称:Android_Location_Demo,代码行数:13,代码来源:GeoFence_Round_Activity.java

示例9: removeMarkers

import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
private void removeMarkers() {
	if (null != markerList && markerList.size() > 0) {
		for (Marker marker : markerList) {
			marker.remove();
		}
		markerList.clear();
	}
}
 
开发者ID:amapapi,项目名称:Android_Location_Demo,代码行数:9,代码来源:GeoFence_Polygon_Activity.java

示例10: remove

import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
public boolean remove(Marker marker) {
     	try {
     		if (mMarkers.remove(marker)) {
                 mAllMarkers.remove(marker);
                 marker.remove();
                 return true;
             }
} catch (Exception e) {
}
         return false;
     }
 
开发者ID:jp1017,项目名称:TheSceneryAlong,代码行数:12,代码来源:MarkerManager.java

示例11: clear

import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
public void clear() {
    for (Marker marker : mMarkers) {
        marker.remove();
        mAllMarkers.remove(marker);
    }
    mMarkers.clear();
}
 
开发者ID:jp1017,项目名称:TheSceneryAlong,代码行数:8,代码来源:MarkerManager.java

示例12: clear

import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
/**
 * Remove all Clusterkraf-managed markers from the map
 */
public void clear() {
	/**
	 * cancel the background thread clustering task
	 */
	if (clusteringTaskHost != null) {
		clusteringTaskHost.cancel();
		clusteringTaskHost = null;
	}
	/**
	 * cancel the background thread transition building task
	 */
	if (clusterTransitionsBuildingTaskHost != null) {
		clusterTransitionsBuildingTaskHost.cancel();
		clusterTransitionsBuildingTaskHost = null;
	}

	/**
	 * we avoid AMap.clear() so users can manage their own
	 * non-clustered markers on the map.
	 * 
	 * @see http://code.google.com/p/gmaps-api-issues/issues/detail?id=4703
	 */
	if (currentMarkers != null) {
		for (Marker marker : currentMarkers) {
			marker.remove();
		}
	}
	
	currentClusters = null;
	currentClusterPointsByMarker = null;
	currentMarkers = null;
	previousClusters = null;
	previousMarkers = null;
	
	points.clear();
}
 
开发者ID:mikezit,项目名称:cluster-amap,代码行数:40,代码来源:Clusterkraf.java

示例13: removePreviousMarkers

import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
private void removePreviousMarkers() {
	AMap map = mapRef.get();
	if (map != null && previousClusters != null && previousMarkers != null) {
		for (Marker marker : previousMarkers) {
			marker.remove();
		}
		previousMarkers = null;
		previousClusters = null;
	}
}
 
开发者ID:mikezit,项目名称:cluster-amap,代码行数:11,代码来源:Clusterkraf.java


注:本文中的com.amap.api.maps.model.Marker.remove方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。