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


Java Polygon.remove方法代码示例

本文整理汇总了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);
}
 
开发者ID:AdrianBZG,项目名称:PhoneChat,代码行数:23,代码来源:PluginPolygon.java

示例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));
    }

}
 
开发者ID:mxiao6,项目名称:Tower-develop,代码行数:25,代码来源:GoogleMapFragment.java

示例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));
    }

}
 
开发者ID:sommishra,项目名称:DroidPlanner-Tower,代码行数:20,代码来源:GoogleMapFragment.java

示例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);
}
 
开发者ID:neo4art,项目名称:neo4art,代码行数:23,代码来源:PluginPolygon.java

示例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();
}
 
开发者ID:kav0rka,项目名称:VennTracker,代码行数:34,代码来源:Circles.java

示例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;
            }
        }
    }
}
 
开发者ID:Ubudu,项目名称:GoogleMapsLayout-Android,代码行数:16,代码来源:MapLayout.java

示例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);
        }
    }
}
 
开发者ID:Ubudu,项目名称:GoogleMapsLayout-Android,代码行数:16,代码来源:MapLayout.java

示例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();
}
 
开发者ID:ngageoint,项目名称:anti-piracy-android-app,代码行数:10,代码来源:OfflineMap.java

示例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();
}
 
开发者ID:ngageoint,项目名称:disconnected-content-explorer-android,代码行数:10,代码来源:OfflineMap.java

示例10: remove

import com.google.android.gms.maps.model.Polygon; //导入方法依赖的package包/类
/**
 * Remove from the map
 */
public void remove() {
    for (Polygon polygon : polygons) {
        polygon.remove();
    }
}
 
开发者ID:ngageoint,项目名称:geopackage-android-map,代码行数:9,代码来源:MultiPolygon.java

示例11: clearPolygonPaths

import com.google.android.gms.maps.model.Polygon; //导入方法依赖的package包/类
private void clearPolygonPaths(){
    for(Polygon polygon: polygonsPaths){
        polygon.remove();
    }
    polygonsPaths.clear();
}
 
开发者ID:mxiao6,项目名称:Tower-develop,代码行数:7,代码来源:GoogleMapFragment.java

示例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();
  }
}
 
开发者ID:airbnb,项目名称:AirMapView,代码行数:7,代码来源:NativeGoogleMapFragment.java


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