View on GitHub Sample viewer app

Get the draw status of your map view or scene view to know when all layers in the map or scene have finished drawing.

Image of display drawing status

Use case

You may want to display a loading indicator while layers are loading, which displays on DrawStatus.IN_PROGRESS.

How to use the sample

Pan and zoom around the map. Observe how the progress indicator is displayed and then hidden, indicating when drawing has completed.

How it works

  1. Create a MapView and a progress indicator.
  2. Bind the visibility of the progress indicator to the drawStatusProperty.

Relevant API

  • ArcGISMap
  • DrawStatus
  • MapView

Tags

draw, loading, map, render

Sample Code

module-info.java module-info.java DisplayDrawingStatusSample.java
/*
* Copyright 2022 Esri.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module com.esri.samples.display_drawing_status {
// require ArcGIS Maps SDK for Java module
requires com.esri.arcgisruntime;
// handle SLF4J http://www.slf4j.org/codes.html#StaticLoggerBinder
requires org.slf4j.nop;
// require JavaFX modules that the application uses
requires javafx.controls;
requires javafx.graphics;
exports com.esri.samples.display_drawing_status;
}