@@ -0,0 +1,2621 @@
+/*%0A * Copyright 2018 Esri.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22); you may not%0A * use this file except in compliance with the License. You may obtain a copy of%0A * the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS, WITHOUT%0A * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the%0A * License for the specific language governing permissions and limitations under%0A * the License.%0A */%0A%0Apackage com.esri.samples.displayinformation.sketch_on_map;%0A%0Aimport com.esri.arcgisruntime.mapping.ArcGISMap;%0Aimport com.esri.arcgisruntime.mapping.Basemap;%0Aimport com.esri.arcgisruntime.mapping.view.GraphicsOverlay;%0Aimport com.esri.arcgisruntime.mapping.view.MapView;%0Aimport javafx.application.Application;%0Aimport javafx.scene.Scene;%0Aimport javafx.scene.layout.StackPane;%0Aimport javafx.stage.Stage;%0A%0Apublic class SketchOnMapSample extends Application %7B%0A%0A  private MapView mapView;%0A%0A  @Override%0A  public void start(Stage stage) %7B%0A%0A    try %7B%0A      // create stack pane and application scene%0A      StackPane stackPane = new StackPane();%0A      Scene scene = new Scene(stackPane);%0A      scene.getStylesheets().add(getClass().getResource(%22/css/style.css%22).toExternalForm());%0A%0A      // set title, size, and add scene to stage%0A      stage.setTitle(%22Sketch on Map Sample%22);%0A      stage.setWidth(1000);%0A      stage.setHeight(700);%0A      stage.setScene(scene);%0A      stage.show();%0A%0A      // create a map with a basemap and add it to the map view%0A      ArcGISMap map = new ArcGISMap(Basemap.Type.IMAGERY, 64.3286, -15.5314, 13 );%0A      mapView = new MapView();%0A      mapView.setMap(map);%0A%0A      // create a graphics overlay for the graphics%0A      GraphicsOverlay graphicsOverlay = new GraphicsOverlay();%0A%0A      // add the graphics overlay to the map view%0A      mapView.getGraphicsOverlays().add(graphicsOverlay);%0A%0A      // create a new sketch editor and add it to the map view%0A%0A%0A%0A%0A      // add the map view to the stack pane%0A      stackPane.getChildren().addAll(mapView);%0A%0A%0A%0A    %7D catch (Exception e) %7B%0A%0A      e.printStackTrace();%0A    %7D%0A  %7D%0A%0A  /**%0A   * Stops and releases all resources used in application%0A   */%0A  @Override%0A  public void stop() %7B%0A    // release resources when the application closes%0A    if (mapView != null) %7B%0A      mapView.dispose();%0A    %7D%0A  %7D%0A%0A  /**%0A   * Opens and runs application.%0A   *%0A   * @param args arguments passed to this application%0A   */%0A  public static void main(String%5B%5D args) %7B%0A%0A    Application.launch(args);%0A  %7D%0A%7D%0A

Create SketchOnMapSample.java