Java 类com.baidu.mapapi.map.Polygon 实例源码

项目:Tower-develop    文件:BaiduMapFragment.java   
@Override
  public void updatePolygonsPaths(List<List<LatLong>> paths) {
      final BaiduMap map = getBaiduMap();
if (map == null) return;

      for (Polygon poly : mPolygonsPaths) {
          poly.remove();
      }

      for (List<LatLong> contour : paths) {
          PolygonOptions pathOptions = new PolygonOptions();
          pathOptions.fillColor(POLYGONS_PATH_DEFAULT_COLOR);
    final List<LatLng> pathPoints = new ArrayList<LatLng>(contour.size());
          for (LatLong coord : contour) {
              pathPoints.add(MapUtils.coordToBaiduLatLng(coord));
          }
          pathOptions.points(pathPoints);
          mPolygonsPaths.add((Polygon)map.addOverlay(pathOptions));
      }

  }
项目:droidplanner-master    文件:BaiduMapFragment.java   
@Override
public void updatePolygonsPaths(List<List<LatLong>> paths) {
    for (Polygon poly : polygonsPaths) {
        poly.remove();
    }

    for (List<LatLong> contour : paths) {
        PolygonOptions pathOptions = new PolygonOptions();
        pathOptions.stroke(new Stroke(POLYGONS_PATH_DEFAULT_WIDTH,POLYGONS_PATH_DEFAULT_COLOR));
        final List<LatLng> pathPoints = new ArrayList<LatLng>(contour.size());
        for (LatLong coord : contour) {
            pathPoints.add(DroneHelper.CoordToBaiduLatLang(coord));
        }
        pathOptions.points(pathPoints);
        polygonsPaths.add((Polygon)getBaiduMap().addOverlay(pathOptions));
    }

}
项目:nongfei-missionplane    文件:BaiduMapFragment.java   
@Override
public void updatePolygonsPaths(List<List<LatLong>> paths) {
    for (Polygon poly : polygonsPaths) {
        poly.remove();
    }

    for (List<LatLong> contour : paths) {
        PolygonOptions pathOptions = new PolygonOptions();
        pathOptions.stroke(new Stroke(POLYGONS_PATH_DEFAULT_WIDTH,POLYGONS_PATH_DEFAULT_COLOR));
        final List<LatLng> pathPoints = new ArrayList<LatLng>(contour.size());
        for (LatLong coord : contour) {
            pathPoints.add(DroneHelper.CoordToBaiduLatLang(coord));
        }
        pathOptions.points(pathPoints);
        polygonsPaths.add((Polygon)getBaiduMap().addOverlay(pathOptions));
    }

}
项目:Gprs_droidplanner    文件:BaiduMapFragment.java   
@Override
public void updatePolygonsPaths(List<List<LatLong>> paths) {
    for (Polygon poly : polygonsPaths) {
        poly.remove();
    }

    for (List<LatLong> contour : paths) {
        PolygonOptions pathOptions = new PolygonOptions();
        pathOptions.stroke(new Stroke(POLYGONS_PATH_DEFAULT_WIDTH,POLYGONS_PATH_DEFAULT_COLOR));
        final List<LatLng> pathPoints = new ArrayList<LatLng>(contour.size());
        for (LatLong coord : contour) {
            pathPoints.add(DroneHelper.CoordToBaiduLatLang(coord));
        }
        pathOptions.points(pathPoints);
        polygonsPaths.add((Polygon)getBaiduMap().addOverlay(pathOptions));
    }

}
项目:Tower-develop    文件:BaiduMapFragment.java   
private void clearPolygonPaths(){
    for(Polygon polygon: mPolygonsPaths){
        polygon.remove();
    }
    mPolygonsPaths.clear();
}
项目:MapPolyDrawer    文件:BMapDrawableMap.java   
@Override
public Polygon addPolygonWithPoints(List<LatLng> points) {
    PolygonOptions option = new PolygonOptions().points(points).zIndex(999);
    Polygon polygon = (Polygon) mBaiduMap.addOverlay(option);
    return polygon;
}
项目:MapPolyDrawer    文件:BMapDrawableMap.java   
@Override
public void removePolygon(Polygon polygon) {
    polygon.remove();
}
项目:MapPolyDrawer    文件:BMapDrawableMap.java   
@Override
public void updatePolygonPoints(Polygon polygon, List<LatLng> points) {
    polygon.setPoints(points);
}