本文整理汇总了Java中com.google.android.gms.maps.model.Polygon.remove方法的典型用法代码示例。如果您正苦于以下问题:Java Polygon.remove方法的具体用法?Java Polygon.remove怎么用?Java Polygon.remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.android.gms.maps.model.Polygon
的用法示例。
在下文中一共展示了Polygon.remove方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: remove
import com.google.android.gms.maps.model.Polygon; //导入方法依赖的package包/类
/**
* Remove the polygon
* @param args
* @param callbackContext
* @throws JSONException
*/
@SuppressWarnings("unused")
private void remove(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
String id = args.getString(1);
Polygon polygon = this.getPolygon(id);
if (polygon == null) {
this.sendNoResult(callbackContext);
return;
}
this.objects.remove(id);
id = "polygon_bounds_" + polygon.getId();
this.objects.remove(id);
polygon.remove();
this.sendNoResult(callbackContext);
}
示例2: updatePolygonsPaths
import com.google.android.gms.maps.model.Polygon; //导入方法依赖的package包/类
@Override
public void updatePolygonsPaths(List<List<LatLong>> paths) {
GoogleMap map = getMap();
if (map == null) {
return;
}
for (Polygon poly : polygonsPaths) {
poly.remove();
}
for (List<LatLong> contour : paths) {
PolygonOptions pathOptions = new PolygonOptions();
pathOptions.strokeColor(POLYGONS_PATH_DEFAULT_COLOR).strokeWidth(
POLYGONS_PATH_DEFAULT_WIDTH);
final List<LatLng> pathPoints = new ArrayList<LatLng>(contour.size());
for (LatLong coord : contour) {
pathPoints.add(MapUtils.coordToLatLng(coord));
}
pathOptions.addAll(pathPoints);
polygonsPaths.add(map.addPolygon(pathOptions));
}
}
示例3: updatePolygonsPaths
import com.google.android.gms.maps.model.Polygon; //导入方法依赖的package包/类
@Override
public void updatePolygonsPaths(List<List<LatLong>> paths) {
for (Polygon poly : polygonsPaths) {
poly.remove();
}
for (List<LatLong> contour : paths) {
PolygonOptions pathOptions = new PolygonOptions();
pathOptions.strokeColor(POLYGONS_PATH_DEFAULT_COLOR).strokeWidth(
POLYGONS_PATH_DEFAULT_WIDTH);
final List<LatLng> pathPoints = new ArrayList<LatLng>(contour.size());
for (LatLong coord : contour) {
pathPoints.add(DroneHelper.CoordToLatLang(coord));
}
pathOptions.addAll(pathPoints);
polygonsPaths.add(getMap().addPolygon(pathOptions));
}
}
示例4: remove
import com.google.android.gms.maps.model.Polygon; //导入方法依赖的package包/类
/**
* Remove the polygon
* @param args
* @param callbackContext
* @throws JSONException
*/
@SuppressWarnings("unused")
private void remove(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
String id = args.getString(1);
Polygon polygon = this.getPolygon(id);
if (polygon == null) {
this.sendNoResult(callbackContext);
return;
}
this.objects.remove(id);
id = "polygon_bounds_" + polygon.getId();
this.objects.remove(id);
polygon.remove();
this.sendNoResult(callbackContext);
}
示例5: clearPolygons
import com.google.android.gms.maps.model.Polygon; //导入方法依赖的package包/类
public static void clearPolygons(Context context) {
// Remove all polygons from map
for (Polygon polygon : mPolygonsToClear) {
polygon.remove();
}
for (Circle circle : mPolygonsRedToClear) {
circle.remove();
}
for (Marker marker : mIntersectingToClear) {
marker.remove();
}
mIntersecting.clear();
mIntersectingToClear.clear();
mPolygonsRedToClear.clear();
mPolygonsRed.clear();
// Clear ArrayList holding polygons
mPolygonsToClear.clear();
// Clear ArrayList holding polygon point LatLng objects
mPolygonPointsGreen.clear();
DatabaseHelper myDb = DatabaseHelper.getInstance(context);
// Clear ArrayList containing hole LatLng objects
mHoles.clear();
// Reset transparency on all markers
SpawnLocation.markerResetTransparency();
// Remove from database
myDb.removeAllHoles();
myDb.removePolygons();
myDb.removeCircles();
myDb.removeIntersections();
myDb.close();
}
示例6: removeZone
import com.google.android.gms.maps.model.Polygon; //导入方法依赖的package包/类
public void removeZone(String name) {
synchronized (zoneVsMarkerAndPolygonMap) {
for (Zone zone : zoneVsMarkerAndPolygonMap.keySet()) {
if (zone.getName().equals(name)) {
Pair<Marker, Polygon> markerAndPolygon = zoneVsMarkerAndPolygonMap.get(zone);
Marker m = markerAndPolygon.first;
Polygon p = markerAndPolygon.second;
m.remove();
p.remove();
zoneVsMarkerAndPolygonMap.remove(zone);
break;
}
}
}
}
示例7: removeZones
import com.google.android.gms.maps.model.Polygon; //导入方法依赖的package包/类
/**
* Removes all zones
*/
public void removeZones() {
synchronized (zoneVsMarkerAndPolygonMap) {
for (Zone zone : zoneVsMarkerAndPolygonMap.keySet()) {
Pair<Marker, Polygon> markerAndPolygon = zoneVsMarkerAndPolygonMap.get(zone);
Marker m = markerAndPolygon.first;
Polygon p = markerAndPolygon.second;
m.remove();
p.remove();
zoneVsMarkerAndPolygonMap.remove(zone);
}
}
}
示例8: clear
import com.google.android.gms.maps.model.Polygon; //导入方法依赖的package包/类
public void clear() {
backgroundTileOverlay.clearTileCache();
backgroundTileOverlay.remove();
for (Polygon polygon : offlinePolygons) {
polygon.remove();
}
offlinePolygons.clear();
}
示例9: clear
import com.google.android.gms.maps.model.Polygon; //导入方法依赖的package包/类
public void clear() {
Log.d(TAG, "clearing offline map");
backgroundTileOverlay.clearTileCache();
backgroundTileOverlay.remove();
for (Polygon polygon : polygons) {
polygon.remove();
}
polygons.clear();
}
示例10: remove
import com.google.android.gms.maps.model.Polygon; //导入方法依赖的package包/类
/**
* Remove from the map
*/
public void remove() {
for (Polygon polygon : polygons) {
polygon.remove();
}
}
示例11: clearPolygonPaths
import com.google.android.gms.maps.model.Polygon; //导入方法依赖的package包/类
private void clearPolygonPaths(){
for(Polygon polygon: polygonsPaths){
polygon.remove();
}
polygonsPaths.clear();
}
示例12: removePolygon
import com.google.android.gms.maps.model.Polygon; //导入方法依赖的package包/类
@Override public <T> void removePolygon(AirMapPolygon<T> polygon) {
Polygon nativePolygon = polygon.getGooglePolygon();
if (nativePolygon != null) {
nativePolygon.remove();
}
}