File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
geometry/buffer-list/src/main/java/com/esri/samples/buffer_list Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -88,21 +88,19 @@ public void start(Stage stage) {
8888 );
8989 Polygon boundaryPolygon = (Polygon ) GeometryEngine .project (new Polygon (new PointCollection (boundaryPoints )), statePlaneNorthCentralTexas );
9090
91- // create a map view
92- mapView = new MapView ();
93-
94- // create a map with a basemap and add it to the map view
91+ // create a blank map with a spatial reference and set an initial viewpoint
9592 ArcGISMap map = new ArcGISMap (statePlaneNorthCentralTexas );
96- mapView .setMap (map );
97-
98- // set an initial viewpoint
9993 map .setInitialViewpoint (new Viewpoint (boundaryPolygon .getExtent ()));
10094
10195 // create an image layer from a service URL (counties, cities, and highways)
10296 ArcGISMapImageLayer mapImageLayer = new ArcGISMapImageLayer ("https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer" );
10397 // add the image layer to the map's base layers
10498 map .getBasemap ().getBaseLayers ().add (mapImageLayer );
10599
100+ // create a map view and set the map to it
101+ mapView = new MapView ();
102+ mapView .setMap (map );
103+
106104 // show alert if layer fails to load
107105 mapImageLayer .addDoneLoadingListener (() -> {
108106 if (mapImageLayer .getLoadStatus () != LoadStatus .LOADED ) {
You can’t perform that action at this time.
0 commit comments