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


Java PointCollection类代码示例

本文整理汇总了Java中com.esri.arcgisruntime.geometry.PointCollection的典型用法代码示例。如果您正苦于以下问题:Java PointCollection类的具体用法?Java PointCollection怎么用?Java PointCollection使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: changeMission

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
/**
 * Change the mission data and reset the animation.
 */
@FXML
private void changeMission() {

  // clear previous mission data
  missionData = new ArrayList<>();

  // get mission data
  String mission = missionSelector.getSelectionModel().getSelectedItem();
  missionData = getMissionData(mission);
  animationModel.setFrames(missionData.size());
  animationModel.setKeyframe(0);

  // draw mission route on mini map
  PointCollection points = new PointCollection(WGS84);
  points.addAll(missionData.stream().map(m -> (Point) m.get("POSITION")).collect(Collectors.toList()));
  Polyline route = new Polyline(points);
  routeGraphic.setGeometry(route);

  // refresh mini map zoom and show initial keyframe
  mapView.setViewpointScaleAsync(100000).addDoneListener(() -> Platform.runLater(() -> animate(0)));
}
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-java,代码行数:25,代码来源:Animate3dGraphicController.java

示例2: createGraphic

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
/**
 * Creates a graphic using a symbol dictionary and the attributes that were passed.
 * 
 * @param attributes tells symbol dictionary what symbol to apply to graphic
 */
private static Graphic createGraphic(Map<String, Object> attributes) {

  // get spatial reference
  int wkid = Integer.parseInt((String) attributes.get("_wkid"));
  SpatialReference sr = SpatialReference.create(wkid);

  // get points from coordinates' string
  PointCollection points = new PointCollection(sr);
  String[] coordinates = ((String) attributes.get("_control_points")).split(";");
  Stream.of(coordinates)
      .map(cs -> cs.split(","))
      .map(c -> new Point(Double.valueOf(c[0]), Double.valueOf(c[1]), sr))
      .collect(Collectors.toCollection(() -> points));

  // return a graphic with multipoint geometry
  return new Graphic(new Multipoint(points), attributes);
}
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-java,代码行数:23,代码来源:DictionaryRendererGraphicsOverlaySample.java

示例3: addGraphicsOverlay

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
/**
 * Creates four different Graphics and renders them to the GrapicsOverlay.
 * 
 */
private void addGraphicsOverlay() {

  // polygon graphic
  PointCollection pointsPoly = new PointCollection(mapView.getSpatialReference());
  pointsPoly.add(new Point(-20E5, 20E5));
  pointsPoly.add(new Point(20E5, 20E5));
  pointsPoly.add(new Point(20E5, -20E5));
  pointsPoly.add(new Point(-20E5, -20E5));
  // hex code for yellow color
  int yellowColor = 0xFFFFFF00;
  SimpleFillSymbol fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID, yellowColor, null);
  Polygon polygon = new Polygon(pointsPoly);
  // create graphic from polygon and symbol
  Graphic polygonGraphic = new Graphic(polygon, fillSymbol);
  // add the polygon graphic
  graphicsOverlay.getGraphics().add(polygonGraphic);
}
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-java,代码行数:22,代码来源:IdentifyGraphicsSample.java

示例4: createPolygon

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
/**
 * Creates the polygon.
 */
private void createPolygon() {

  // part one
  PointCollection partSegmentCollectionOne = new PointCollection(SpatialReferences.getWebMercator());
  partSegmentCollectionOne.add(new Point(-13020, 6710130));
  partSegmentCollectionOne.add(new Point(-14160, 6710130));
  partSegmentCollectionOne.add(new Point(-14160, 6709300));
  partSegmentCollectionOne.add(new Point(-13020, 6709300));
  partSegmentCollectionOne.add(new Point(-13020, 6710130));
  Part partOne = new Part(partSegmentCollectionOne);

  // part two
  PointCollection partSegmentCollectionTwo = new PointCollection(SpatialReferences.getWebMercator());
  partSegmentCollectionTwo.add(new Point(-12160, 6710730));
  partSegmentCollectionTwo.add(new Point(-13160, 6710730));
  partSegmentCollectionTwo.add(new Point(-13160, 6709100));
  partSegmentCollectionTwo.add(new Point(-12160, 6709100));
  partSegmentCollectionTwo.add(new Point(-12160, 6710730));
  Part partTwo = new Part(partSegmentCollectionTwo);

  // part three
  PointCollection partSegmentCollectionThree = new PointCollection(SpatialReferences.getWebMercator());
  partSegmentCollectionThree.add(new Point(-12560, 6710030));
  partSegmentCollectionThree.add(new Point(-13520, 6710030));
  partSegmentCollectionThree.add(new Point(-13520, 6709000));
  partSegmentCollectionThree.add(new Point(-12560, 6709000));
  partSegmentCollectionThree.add(new Point(-12560, 6710030));
  Part partThree = new Part(partSegmentCollectionThree);

  PartCollection polygonParts = new PartCollection(partOne);
  polygonParts.add(partTwo);
  polygonParts.add(partThree);

  // transparent (0x00000000) fill
  SimpleFillSymbol fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID, 0x00000000, line);
  polygon = new Graphic(new Polygon(polygonParts), fillSymbol);

}
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-java,代码行数:42,代码来源:GeometryEngineSimplifySample.java

示例5: createPolyline

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
/**
 * Creates a Polyline and adds it to a GraphicsOverlay.
 */
private void createPolyline() {

  // create a purple (0xFF800080) simple line symbol
  SimpleLineSymbol lineSymbol = new SimpleLineSymbol(SimpleLineSymbol.Style.DASH, 0xFF800080, 4);

  // create a new point collection for polyline
  PointCollection points = new PointCollection(SPATIAL_REFERENCE);

  // create and add points to the point collection
  points.add(new Point(-2.715, 56.061));
  points.add(new Point(-2.6438, 56.079));
  points.add(new Point(-2.638, 56.079));
  points.add(new Point(-2.636, 56.078));
  points.add(new Point(-2.636, 56.077));
  points.add(new Point(-2.637, 56.076));
  points.add(new Point(-2.715, 56.061));

  // create the polyline from the point collection
  Polyline polyline = new Polyline(points);

  // create the graphic with polyline and symbol
  Graphic graphic = new Graphic(polyline, lineSymbol);

  // add graphic to the graphics overlay
  graphicsOverlay.getGraphics().add(graphic);
}
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-java,代码行数:30,代码来源:AddGraphicsWithSymbolsSample.java

示例6: createPolygon

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
/**
 * Creates a Polygon and adds it to a GraphicsOverlay.
 */
private void createPolygon() {

  // create a green (0xFF005000) simple line symbol
  SimpleLineSymbol outlineSymbol = new SimpleLineSymbol(SimpleLineSymbol.Style.DASH, 0xFF005000, 1);
  // create a green (0xFF005000) mesh simple fill symbol
  SimpleFillSymbol fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.DIAGONAL_CROSS, 0xFF005000,
      outlineSymbol);

  // create a new point collection for polygon
  PointCollection points = new PointCollection(SPATIAL_REFERENCE);

  // create and add points to the point collection
  points.add(new Point(-2.6425, 56.0784));
  points.add(new Point(-2.6430, 56.0763));
  points.add(new Point(-2.6410, 56.0759));
  points.add(new Point(-2.6380, 56.0765));
  points.add(new Point(-2.6380, 56.0784));
  points.add(new Point(-2.6410, 56.0786));

  // create the polyline from the point collection
  Polygon polygon = new Polygon(points);

  // create the graphic with polyline and symbol
  Graphic graphic = new Graphic(polygon, fillSymbol);

  // add graphic to the graphics overlay
  graphicsOverlay.getGraphics().add(graphic);
}
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-java,代码行数:32,代码来源:AddGraphicsWithSymbolsSample.java

示例7: getNestingGroundGeometry

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
private Polygon getNestingGroundGeometry() {

        //a new point collection to make up the polygon
        PointCollection points = new PointCollection(wgs84);

        //add points to the point collection
        points.add(new Point(-2.643077012566659,56.077125346044475));
        points.add(new Point(-2.6428195210159444,56.07717324600376));
        points.add(new Point(-2.6425405718360033,56.07774804087097));
        points.add(new Point(-2.6427122328698127,56.077927662508635));
        points.add(new Point(-2.642454741319098,56.07829887790651));
        points.add(new Point(-2.641853927700763,56.078526395253725));
        points.add(new Point(-2.6409741649024867,56.078801809192434));
        points.add(new Point(-2.6399871139580795,56.07881378366685));
        points.add(new Point(-2.6394077579689705,56.07908919555142));
        points.add(new Point(-2.638764029092183,56.07917301616904));
        points.add(new Point(-2.638485079912242,56.07896945149566));
        points.add(new Point(-2.638570910429147,56.078203080726844));
        points.add(new Point(-2.63878548672141,56.077568418396));
        points.add(new Point(-2.6391931816767085,56.077197195961084));
        points.add(new Point(-2.6399441986996273,56.07675411934114));
        points.add(new Point(-2.6406523004640934,56.076730169108444));
        points.add(new Point(-2.6406737580933193,56.07632301287509));
        points.add(new Point(-2.6401802326211157,56.075999679860494));
        points.add(new Point(-2.6402446055087943,56.075844000034046));
        points.add(new Point(-2.640416266542604,56.07578412301025));
        points.add(new Point(-2.6408883343855822,56.075808073830935));
        points.add(new Point(-2.6417680971838577,56.076239186057734));
        points.add(new Point(-2.642197249768383,56.076251161328514));
        points.add(new Point(-2.6428409786451708,56.07661041772168));
        points.add(new Point(-2.643077012566659,56.077125346044475));

        //create a polygon from the point collection
        return new Polygon(points);
    }
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-android,代码行数:36,代码来源:MainActivity.java

示例8: createMultipoint

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
private Multipoint createMultipoint() {
  //[DocRef: Name=Create Multipoint, Category=Fundamentals, Topic=Geometries]
  // create a Multipoint from a PointCollection
  PointCollection stateCapitalsPST = new PointCollection(SpatialReferences.getWgs84());
  stateCapitalsPST.add(-121.491014, 38.579065); // Sacramento, CA
  stateCapitalsPST.add(-122.891366, 47.039231); // Olympia, WA
  stateCapitalsPST.add(-123.043814, 44.93326); // Salem, OR
  stateCapitalsPST.add(-119.766999, 39.164885); // Carson City, NV
  Multipoint multipoint = new Multipoint(stateCapitalsPST);
  //[DocRef: END]

  return multipoint;
}
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-android,代码行数:14,代码来源:MainActivity.java

示例9: createPolyline

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
private Polyline createPolyline() {
  //[DocRef: Name=Create Polyline, Category=Fundamentals, Topic=Geometries]
  // create a Polyline from a PointCollection
  PointCollection borderCAtoNV = new PointCollection(SpatialReferences.getWgs84());
  borderCAtoNV.add(-119.992, 41.989);
  borderCAtoNV.add(-119.994, 38.994);
  borderCAtoNV.add(-114.620, 35.0);
  Polyline polyline = new Polyline(borderCAtoNV);
  //[DocRef: END]

  return polyline;
}
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-android,代码行数:13,代码来源:MainActivity.java

示例10: createPolygon

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
private Polygon createPolygon() {
  //[DocRef: Name=Create Polygon, Category=Fundamentals, Topic=Geometries]
  // create a Polygon from a PointCollection
  PointCollection coloradoCorners = new PointCollection(SpatialReferences.getWgs84());
  coloradoCorners.add(-109.048, 40.998);
  coloradoCorners.add(-102.047, 40.998);
  coloradoCorners.add(-102.037, 36.989);
  coloradoCorners.add(-109.048, 36.998);
  Polygon polygon = new Polygon(coloradoCorners);
  //[DocRef: END]

  return polygon;
}
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-android,代码行数:14,代码来源:MainActivity.java

示例11: setDrawingMode

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
/**
 * Sets the current drawing mode of the SketchGraphicsOverlay.
 *
 * @param drawingMode the drawing mode to set
 */
public void setDrawingMode(DrawingMode drawingMode) {
  // If we try to start a new drawing before finishing our last, finish the current one
  if (mDrawingMode != DrawingMode.NONE) {
    finishDrawing();
  }
  mDrawingMode = drawingMode;
  // If the drawing mode is polyline or polygon, set the current point collection to an empty collection
  if (mDrawingMode == DrawingMode.POLYLINE || mDrawingMode == DrawingMode.POLYGON) {
    mCurrentPointCollection = new PointCollection(mMapView.getSpatialReference());
  }
}
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-android,代码行数:17,代码来源:SketchGraphicsOverlay.java

示例12: start

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
@Override
public void start(Stage stage) throws Exception {

  try {

    // create stack pane and JavaFX app scene
    StackPane stackPane = new StackPane();
    Scene fxScene = new Scene(stackPane);

    // set title, squareSize, and add JavaFX scene to stage
    stage.setTitle("Extrude Graphics Sample");
    stage.setWidth(800);
    stage.setHeight(700);
    stage.setScene(fxScene);
    stage.show();

    // create a scene and add a basemap to it
    ArcGISScene scene = new ArcGISScene();
    scene.setBasemap(Basemap.createImagery());

    // add the SceneView to the stack pane
    sceneView = new SceneView();
    sceneView.setArcGISScene(scene);
    stackPane.getChildren().add(sceneView);

    Camera camera = new Camera(28.4, 83, 10000, 10.0, 80.0, 0);
    sceneView.setViewpointCamera(camera);

    // add base surface for elevation data
    Surface surface = new Surface();
    surface.getElevationSources().add(new ArcGISTiledElevationSource(ELEVATION_IMAGE_SERVICE));
    scene.setBaseSurface(surface);

    // add a graphics overlay
    GraphicsOverlay graphicsOverlay = new GraphicsOverlay();
    graphicsOverlay.getSceneProperties().setSurfacePlacement(LayerSceneProperties.SurfacePlacement.DRAPED);

    // set renderer with extrusion property
    SimpleRenderer renderer = new SimpleRenderer();
    SceneProperties renderProperties = renderer.getSceneProperties();
    renderProperties.setExtrusionMode(SceneProperties.ExtrusionMode.BASE_HEIGHT);
    renderProperties.setExtrusionExpression("[HEIGHT]");
    graphicsOverlay.setRenderer(renderer);

    // setup graphic positions
    double squareSize = 0.01;
    double maxHeight = 10000.0;
    double x = camera.getLocation().getX();
    double y = camera.getLocation().getY() + 0.2;
    List<Point> points = IntStream.range(0, 100).mapToObj(i -> new Point(i / 10 * squareSize + x, i % 10 *
        squareSize + y)).collect(Collectors.toList());

    // create and style graphics
    points.forEach(p -> {
      double z = (int) (maxHeight * Math.random());
      int color = ColorUtil.colorToArgb(Color.color(1.0 / maxHeight * z, 0, 0.5, 1));
      Polygon polygon = new Polygon(new PointCollection(Arrays.asList(new Point(p.getX(), p.getY(), z), new Point(p
          .getX() + squareSize, p.getY(), z), new Point(p.getX() + squareSize, p.getY() + squareSize, z), new Point(p
              .getX(), p.getY() + squareSize, z))));
      Graphic graphic = new Graphic(polygon);
      graphic.getAttributes().put("HEIGHT", z);
      graphic.setSymbol(new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID, color, null));
      graphicsOverlay.getGraphics().add(graphic);
    });

    sceneView.getGraphicsOverlays().add(graphicsOverlay);
  } catch (Exception e) {
    // on any error, display the stack trace
    e.printStackTrace();
  }
}
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-java,代码行数:72,代码来源:ExtrudeGraphicsSample.java

示例13: start

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
@Override
public void start(Stage stage) throws Exception {

  try {
    // create stack pane and application scene
    StackPane stackPane = new StackPane();
    Scene scene = new Scene(stackPane);
    scene.getStylesheets().add(getClass().getResource("/css/style.css").toExternalForm());

    // set title, size, and add scene to stage
    stage.setTitle("Simple Line Symbol Sample");
    stage.setWidth(800);
    stage.setHeight(700);
    stage.setScene(scene);
    stage.show();

    // create a control panel
    VBox vBoxControl = new VBox(6);
    vBoxControl.setMaxSize(180, 200);
    vBoxControl.getStyleClass().add("panel-region");

    createSymbolFuntionality(vBoxControl);

    final ArcGISMap map = new ArcGISMap(Basemap.createImagery());

    // set initial map view point
    Point point = new Point(-226773, 6550477, SpatialReferences.getWebMercator());
    Viewpoint viewpoint = new Viewpoint(point, 7200); // point, scale
    map.setInitialViewpoint(viewpoint);

    // create a view for this ArcGISMap and set ArcGISMap to it
    mapView = new MapView();
    mapView.setMap(map);

    // creates a line from two points
    PointCollection points = new PointCollection(SpatialReferences.getWebMercator());
    points.add(-226913, 6550477);
    points.add(-226643, 6550477);
    Polyline line = new Polyline(points);

    // creates a solid red (0xFFFF0000) simple line symbol
    lineSymbol = new SimpleLineSymbol(Style.SOLID, 0xFFFF0000, 3);

    // add line with symbol to graphics overlay and add overlay to map view
    GraphicsOverlay graphicsOverlay = new GraphicsOverlay();
    mapView.getGraphicsOverlays().add(graphicsOverlay);
    graphicsOverlay.getGraphics().add(new Graphic(line, lineSymbol));

    // add the map view and control panel to stack pane
    stackPane.getChildren().addAll(mapView, vBoxControl);
    StackPane.setAlignment(vBoxControl, Pos.TOP_LEFT);
    StackPane.setMargin(vBoxControl, new Insets(10, 0, 0, 10));
  } catch (Exception e) {
    // on any error, display the stack trace
    e.printStackTrace();
  }
}
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-java,代码行数:58,代码来源:SimpleLineSymbolSample.java

示例14: start

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
@Override
public void start(Stage stage) throws Exception {

  try {
    // create stack pane and application scene
    StackPane stackPane = new StackPane();
    Scene scene = new Scene(stackPane);
    scene.getStylesheets().add(getClass().getResource("/css/style.css").toExternalForm());

    // set title, size, and add scene to stage
    stage.setTitle("Simple Fill Symbol Sample");
    stage.setWidth(800);
    stage.setHeight(700);
    stage.setScene(scene);
    stage.show();

    // create a control panel
    vBoxControl = new VBox(6);
    vBoxControl.setMaxSize(180, 200);
    vBoxControl.getStyleClass().add("panel-region");

    createSymbolFuntionality();

    final ArcGISMap map = new ArcGISMap(Basemap.createTopographic());

    // set initial map view point
    Point initialPoint = new Point(-12000000, 5400000, SpatialReferences.getWebMercator());
    Viewpoint viewpoint = new Viewpoint(initialPoint, 10000000); // point, scale
    map.setInitialViewpoint(viewpoint);

    // create a view for this ArcGISMap and set ArcGISMap to it
    mapView = new MapView();
    mapView.setMap(map);

    // creates a square from four points
    PointCollection points = new PointCollection(SpatialReferences.getWebMercator());
    points.add(-1.1579397849033352E7, 5618494.623878779);
    points.add(-1.158486021463032E7, 5020365.591010623);
    points.add(-1.236324731219847E7, 5009440.859816683);
    points.add(-1.2360516129399985E7, 5621225.806677263);
    Polygon square = new Polygon(points);

    // transparent red (0x88FF0000) color symbol
    fillSymbol = new SimpleFillSymbol(Style.SOLID, 0x88FF0000, null);

    // renders graphics to the GeoView
    GraphicsOverlay graphicsOverlay = new GraphicsOverlay();
    mapView.getGraphicsOverlays().add(graphicsOverlay);
    graphicsOverlay.getGraphics().add(new Graphic(square, fillSymbol));

    createLineSymbols();

    // add the map view and control panel to stack pane
    stackPane.getChildren().addAll(mapView, vBoxControl);
    StackPane.setAlignment(vBoxControl, Pos.TOP_LEFT);
    StackPane.setMargin(vBoxControl, new Insets(10, 0, 0, 10));

  } catch (Exception e) {
    // on any error, display the stack trace
    e.printStackTrace();
  }
}
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-java,代码行数:63,代码来源:SimpleFillSymbolSample.java

示例15: getBoatTripGeometry

import com.esri.arcgisruntime.geometry.PointCollection; //导入依赖的package包/类
private Polyline getBoatTripGeometry() {
    //a new point collection to make up the polyline
    PointCollection boatPositions = new PointCollection(wgs84);
    //add positions to the point collection
    boatPositions.add(new Point(-2.7184791227926772,56.06147084563517));
    boatPositions.add(new Point(-2.7196807500463924,56.06147084563517));
    boatPositions.add(new Point(-2.722084004553823,56.062141712059706));
    boatPositions.add(new Point(-2.726375530459948,56.06386674355254));
    boatPositions.add(new Point(-2.726890513568683,56.0660708381432));
    boatPositions.add(new Point(-2.7270621746049275,56.06779569383808));
    boatPositions.add(new Point(-2.7255172252787228,56.068753913653914));
    boatPositions.add(new Point(-2.723113970771293,56.069424653352335));
    boatPositions.add(new Point(-2.719165766937657,56.07028701581465));
    boatPositions.add(new Point(-2.713672613777817,56.070574465681325));
    boatPositions.add(new Point(-2.7093810878716917,56.07095772883556));
    boatPositions.add(new Point(-2.7044029178205866,56.07153261642126));
    boatPositions.add(new Point(-2.698223120515766,56.072394931722265));
    boatPositions.add(new Point(-2.6923866452834355,56.07325722773041));
    boatPositions.add(new Point(-2.68672183108735,56.07335303720707));
    boatPositions.add(new Point(-2.6812286779275096,56.07354465544585));
    boatPositions.add(new Point(-2.6764221689126497,56.074215311778964));
    boatPositions.add(new Point(-2.6698990495353394,56.07488595644139));
    boatPositions.add(new Point(-2.6647492184479886,56.075748196715914));
    boatPositions.add(new Point(-2.659427726324393,56.076131408423215));
    boatPositions.add(new Point(-2.654792878345778,56.07622721075461));
    boatPositions.add(new Point(-2.651359657620878,56.076514616319784));
    boatPositions.add(new Point(-2.6477547758597324,56.07708942101955));
    boatPositions.add(new Point(-2.6450081992798125,56.07814320736718));
    boatPositions.add(new Point(-2.6432915889173625,56.08025069360931));
    boatPositions.add(new Point(-2.638656740938747,56.08044227755186));
    boatPositions.add(new Point(-2.636940130576297,56.078813783674946));
    boatPositions.add(new Point(-2.636425147467562,56.07728102068079));
    boatPositions.add(new Point(-2.637798435757522,56.076610417698504));
    boatPositions.add(new Point(-2.638656740938747,56.07507756705851));
    boatPositions.add(new Point(-2.641231656482422,56.07479015077557));
    boatPositions.add(new Point(-2.6427766058086277,56.075748196715914));
    boatPositions.add(new Point(-2.6456948434247924,56.07546078543464));
    boatPositions.add(new Point(-2.647239792750997,56.074598538729404));
    boatPositions.add(new Point(-2.6492997251859376,56.072682365868616));
    boatPositions.add(new Point(-2.6530762679833284,56.0718200569986));
    boatPositions.add(new Point(-2.655479522490758,56.070861913404286));
    boatPositions.add(new Point(-2.6587410821794135,56.07047864929729));
    boatPositions.add(new Point(-2.6633759301580286,56.07028701581465));
    boatPositions.add(new Point(-2.666637489846684,56.07009538137926));
    boatPositions.add(new Point(-2.670070710571584,56.06990374599109));
    boatPositions.add(new Point(-2.6741905754414645,56.069137194910745));
    boatPositions.add(new Point(-2.678310440311345,56.06808316228391));
    boatPositions.add(new Point(-2.682086983108735,56.06789151689155));
    boatPositions.add(new Point(-2.6868934921235956,56.06760404701653));
    boatPositions.add(new Point(-2.6911850180297208,56.06722075051504));
    boatPositions.add(new Point(-2.695133221863356,56.06702910083509));
    boatPositions.add(new Point(-2.698223120515766,56.066837450202335));
    boatPositions.add(new Point(-2.7016563412406667,56.06645414607839));
    boatPositions.add(new Point(-2.7061195281830366,56.0660708381432));
    boatPositions.add(new Point(-2.7100677320166717,56.065591697864576));
    boatPositions.add(new Point(-2.713329291705327,56.06520838135397));
    boatPositions.add(new Point(-2.7167625124302273,56.06453756828941));
    boatPositions.add(new Point(-2.718307461756433,56.06348340989081));
    boatPositions.add(new Point(-2.719165766937657,56.062812566811544));
    boatPositions.add(new Point(-2.7198524110826376,56.06204587471371));
    boatPositions.add(new Point(-2.719165766937657,56.06166252294756));
    boatPositions.add(new Point(-2.718307461756433,56.06147084563517));

    //create the polyline from the point collection
    return new Polyline(boatPositions);
}
 
开发者ID:Esri,项目名称:arcgis-runtime-samples-android,代码行数:67,代码来源:MainActivity.java


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