public abstract class

GeoView

extends ViewGroup
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ com.esri.arcgisruntime.mapping.view.GeoView
Known Direct Subclasses

Class Overview

GeoView is a base class for MapView and SceneView (when available), these represent the View in an Model View Controller (MVC) architecture, the Map and Scene that are set on these views represent the model.

It contains all of the common operations and events that apply to displaying and working with Maps and Scenes. This includes changing what is viewable by setting a viewpoint, responding to viewpoint change events, working with graphics overlays and identifying elements that displayed at a given location in the view.

See Also

Summary

[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Methods
void addAttributionTextChangedListener(AttributionTextChangedListener listener)
Registers an AttributionTextChangedListener to be called when the attribution text of the GeoView changes, for example if a layer is removed or added the attribution text needs to update.
void addAttributionViewLayoutChangeListener(View.OnLayoutChangeListener layoutChangeListener)
Registers a listener that will be called when the bounds of the attribution view change due to expanding or collapsing.
void addDrawStatusChangedListener(DrawStatusChangedListener listener)
Registers a DrawStatusChangedListener to be called when the DrawStatus of the MapView changes, for example when the map initially finishes loading, or tiles and features are finished loading after map navigation.
void addLayerViewStateChangedListener(LayerViewStateChangedListener listener)
Register a LayerViewStateChangedListener to be called when the view state of any layer in the map changes, for example if a layer goes in or out of visible scale range, or is made visible or not visible.
void addNavigationChangedListener(NavigationChangedListener listener)
Adds a NavigationChangedListener to be called when the navigation state of this view has changed.
void addSpatialReferenceChangedListener(SpatialReferenceChangedListener listener)
Registers a SpatialReferenceChangedListener to be called when the SpatialReference of the MapView changes, for example if a new ArcGISMap with a different SpatialReference is loaded.
void addViewpointChangedListener(ViewpointChangedListener listener)
Registers a ViewpointChangedListener to be called when the Viewpoint of the GeoView changes, for example when the ArcGISMap is navigated interactively by the user, or programmatically by calling a setViewpoint method.
void dispose()
Releases resources.
ListenableFuture<Bitmap> exportImageAsync()
Asynchronously exports the GeoView into a Bitmap.
String getAttributionText()
Gets a concatenated string with attribution text for all layers.
Viewpoint getCurrentViewpoint(Viewpoint.Type viewpointType)
Gets a Viewpoint of the given Viewpoint.Type, describing the visible area and view location of the map.
DrawStatus getDrawStatus()
Returns the current draw status.
ListenableList<GraphicsOverlay> getGraphicsOverlays()
Gets a modifiable listenable list of the graphics overlays.
EnumSet<LayerViewStatus> getLayerViewState(Layer layer)
Returns a set of view states that apply to the given layer.
SelectionProperties getSelectionProperties()
Returns the selection properties that are applied to a GeoView.
abstract SpatialReference getSpatialReference()
Gets the SpatialReference of this GeoView.
TimeExtent getTimeExtent()
Gets the current time extent.
ListenableFuture<IdentifyGraphicsOverlayResult> identifyGraphicsOverlayAsync(GraphicsOverlay graphicsOverlay, Point screenPoint, double tolerance, boolean returnPopupsOnly, int maximumResults)
Asynchronously identifies the visible graphics in the given graphics overlay, at the given screen point.
ListenableFuture<IdentifyGraphicsOverlayResult> identifyGraphicsOverlayAsync(GraphicsOverlay graphicsOverlay, Point screenPoint, double tolerance, boolean returnPopupsOnly)
Asynchronously identifies the topmost visible graphic in the given graphics overlay, at the given screen point.
ListenableFuture<List<IdentifyGraphicsOverlayResult>> identifyGraphicsOverlaysAsync(Point screenPoint, double tolerance, boolean returnPopupsOnly)
Asynchronously identifies the topmost visible graphic in each graphics overlay in this view, at the given screen point.
ListenableFuture<List<IdentifyGraphicsOverlayResult>> identifyGraphicsOverlaysAsync(Point screenPoint, double tolerance, boolean returnPopupsOnly, int maximumResults)
Asynchronously identifies the visible graphics at the given screen point in all graphics overlays in this view.
ListenableFuture<IdentifyLayerResult> identifyLayerAsync(Layer layer, Point screenPoint, double tolerance, boolean returnPopupsOnly, int maximumResults)
Asynchronously identifies GeoElements in the given layer.
ListenableFuture<IdentifyLayerResult> identifyLayerAsync(Layer layer, Point screenPoint, double tolerance, boolean returnPopupsOnly)
Asynchronously identifies the topmost visible GeoElement in the given layer.
ListenableFuture<List<IdentifyLayerResult>> identifyLayersAsync(Point screenPoint, double tolerance, boolean returnPopupsOnly, int maximumResults)
Asynchronously identifies GeoElements on all identifiable layers in the map.
ListenableFuture<List<IdentifyLayerResult>> identifyLayersAsync(Point screenPoint, double tolerance, boolean returnPopupsOnly)
Asynchronously identifies the topmost visible GeoElement in each identifiable layer in the map.
boolean isAttributionTextVisible()
Indicates whether the Esri attribution text is visible or not.
boolean isNavigating()
Indicates if the viewpoint of the map is currently being changed.
boolean isWrapAroundEnabled()
Indicates whether wrap around map display is enabled or not.
void pause()
Pauses the drawing of the GeoView.
boolean removeAttributionTextChangedListener(AttributionTextChangedListener listener)
Unregisters an AttributionTextChangedListener that was previously added using addAttributionTextChangedListener(AttributionTextChangedListener).
void removeAttributionViewLayoutChangeListener(View.OnLayoutChangeListener layoutChangeListener)
Unregisters a listener for the attribution view layout changes.
boolean removeDrawStatusChangedListener(DrawStatusChangedListener listener)
Unregisters the given DrawStatusChangedListener that was previously added using addDrawStatusChangedListener(DrawStatusChangedListener).
boolean removeLayerViewStateChangedListener(LayerViewStateChangedListener listener)
Unregisters the given LayerViewStateChangedListener that was previously added using addLayerViewStateChangedListener(LayerViewStateChangedListener).
boolean removeNavigationChangedListener(NavigationChangedListener listener)
Unregisters the given NavigationChangedListener that was previously added using addNavigationChangedListener(NavigationChangedListener).
boolean removeSpatialReferenceChangedListener(SpatialReferenceChangedListener listener)
Unregisters the given SpatialReferenceChangedListener that was previously added using addSpatialReferenceChangedListener(SpatialReferenceChangedListener).
boolean removeViewpointChangedListener(ViewpointChangedListener listener)
Unregisters a ViewpointChangedListener that was previously added using addViewpointChangedListener(ViewpointChangedListener).
void resume()
Resumes the drawing of the GeoView that has been paused, restarting the display of the contained ArcGISMap.
void setAttributionTextVisible(boolean visible)
Sets the visibility of the Esri attribution text, this is visible by default.
ListenableFuture<Boolean> setBookmarkAsync(Bookmark bookmark)
Asynchronously sets the bookmark, which consequently applies the viewpoint within the bookmark to the GeoView.
void setTimeExtent(TimeExtent timeExtent)
Sets the time extent of the GeoView.
void setViewpoint(Viewpoint viewpoint)
Zooms and/or pans the map to the given Viewpoint.
ListenableFuture<Boolean> setViewpointAsync(Viewpoint viewpoint, float durationSeconds)
Asynchronously zooms and/or pans the map or scene to the given Viewpoint, taking the given number of seconds to complete the navigation.
ListenableFuture<Boolean> setViewpointAsync(Viewpoint viewpoint)
Asynchronously zooms and/or pans the map or scene to the given Viewpoint.
Protected Methods
abstract void onDrawFrame(GL10 gl)
Called to draw the current frame.
[Expand]
Inherited Methods
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource

Public Methods

public void addAttributionTextChangedListener (AttributionTextChangedListener listener)

Registers an AttributionTextChangedListener to be called when the attribution text of the GeoView changes, for example if a layer is removed or added the attribution text needs to update.

This listener will be invoked on the UI thread if it is added from the UI thread, otherwise it is not guaranteed on which thread the listener is invoked.

Parameters
listener the listener to register
Throws
NullPointerException if the argument is null

public void addAttributionViewLayoutChangeListener (View.OnLayoutChangeListener layoutChangeListener)

Registers a listener that will be called when the bounds of the attribution view change due to expanding or collapsing.

Here is an example to demonstrate how a FloatingActionButton object moves up and down corresponding to the change of the attribution view :

  FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
  final CoordinatorLayout.LayoutParams layoutParams = (CoordinatorLayout.LayoutParams)fab.getLayoutParams();
  mMapView.addAttributionViewLayoutChangeListener(new View.OnLayoutChangeListener() {
      @Override
      public void onLayoutChange(
      View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom)
      {
          int heightChanged = v.getHeight() - (oldBottom - oldTop);
          layoutParams.bottomMargin += heightChanged;
      }
  });
 

Parameters
layoutChangeListener the listener that will be called when layout bounds change
Throws
IllegalArgumentException if layoutChangeListener is null

public void addDrawStatusChangedListener (DrawStatusChangedListener listener)

Registers a DrawStatusChangedListener to be called when the DrawStatus of the MapView changes, for example when the map initially finishes loading, or tiles and features are finished loading after map navigation.

To find out about viewing status changes of specific layers, use the addLayerViewStateChangedListener(LayerViewStateChangedListener) method instead.

This listener will be invoked on the UI thread if it is added from the UI thread, otherwise it is not guaranteed on which thread the listener is invoked.

Parameters
listener the listener to register
Throws
NullPointerException if the argument is null

public void addLayerViewStateChangedListener (LayerViewStateChangedListener listener)

Register a LayerViewStateChangedListener to be called when the view state of any layer in the map changes, for example if a layer goes in or out of visible scale range, or is made visible or not visible.

To find out about the drawing status changes of the entire map, use the addDrawStatusChangedListener(DrawStatusChangedListener) method instead.

This listener will be invoked on the UI thread if it is added from the UI thread, otherwise it is not guaranteed on which thread the listener is invoked.

Parameters
listener the listener to register
Throws
NullPointerException if the argument is null

public void addNavigationChangedListener (NavigationChangedListener listener)

Adds a NavigationChangedListener to be called when the navigation state of this view has changed.

As this listener will be called less frequently than the ViewpointChangedListener, you can use this to perform operations that are more expensive extent-based operations; note however that navigation may begin again at any time. This method is called when isNavigating() changes.

This listener will be invoked on the UI thread if it is added from the UI thread, otherwise it is not guaranteed on which thread the listener is invoked.

Parameters
listener the listener to register
Throws
NullPointerException if the argument is null

public void addSpatialReferenceChangedListener (SpatialReferenceChangedListener listener)

Registers a SpatialReferenceChangedListener to be called when the SpatialReference of the MapView changes, for example if a new ArcGISMap with a different SpatialReference is loaded.

This listener will be invoked on the UI thread if it is added from the UI thread, otherwise it is not guaranteed on which thread the listener is invoked.

Parameters
listener the listener to register
Throws
NullPointerException if the argument is null

public void addViewpointChangedListener (ViewpointChangedListener listener)

Registers a ViewpointChangedListener to be called when the Viewpoint of the GeoView changes, for example when the ArcGISMap is navigated interactively by the user, or programmatically by calling a setViewpoint method.

This listener may be called very frequently, therefore should perform only very short operations. If more extensive work is required, consider using NavigationChangedListener instead.

This listener will be invoked on the UI thread if it is added from the UI thread, otherwise it is not guaranteed on which thread the listener is invoked.

Parameters
listener the listener to register
Throws
IllegalArgumentException if the argument is null

public void dispose ()

Releases resources. Call this when you are finished with a view.

public ListenableFuture<Bitmap> exportImageAsync ()

Asynchronously exports the GeoView into a Bitmap. The Bitmap will only contain content of an ArcGISMap or ArcGISScene that is currently visible. Elements drawn on top of the GeoView such as callouts will not be in the Bitmap.

Returns
  • a ListenableFuture that provides a Bitmap of current GeoView upon successful completion of the async operation

public String getAttributionText ()

Gets a concatenated string with attribution text for all layers.

Returns
  • a concatenated string with attribution text for all layers

public Viewpoint getCurrentViewpoint (Viewpoint.Type viewpointType)

Gets a Viewpoint of the given Viewpoint.Type, describing the visible area and view location of the map.

Not all types of Viewpoint are applicable to all subtypes of GeoView; Type.CAMERA is not applicable to the MapView for example.

Parameters
viewpointType the type of Viewpoint to return
Returns
  • the requested type of Viewpoint
Throws
IllegalArgumentException if the argument is null

public DrawStatus getDrawStatus ()

Returns the current draw status.

Returns
  • the current draw status

public ListenableList<GraphicsOverlay> getGraphicsOverlays ()

Gets a modifiable listenable list of the graphics overlays. Add or remove graphics overlays from this list to change the graphics overlays displayed. The list returned may be empty, but is never null.

You can add listeners to the returned list to be notified when graphics overlays are added to, or removed from, this View. Use identifyGraphicsOverlayAsync to find the graphics at a specific screen location in a graphics overlay in this list.

Returns
  • the list of graphics overlays currently in this view

public EnumSet<LayerViewStatus> getLayerViewState (Layer layer)

Returns a set of view states that apply to the given layer. This can be used, for example, to report layer status in a map legend or table of contents.

Each layer may have more than one view status; for example, a layer may be LOADING, and therefore NOT_VISIBLE, or may be NOT_VISIBLE because it is currently OUT_OF_SCALE. If the layer is ACTIVE, this will be the only view state returned. For child layers of group layers, the parent layers status is taken into account.

Parameters
layer the layer
Returns
  • the layer view status(es) which apply to the given layer
Throws
IllegalArgumentException if the argument is null

public SelectionProperties getSelectionProperties ()

Returns the selection properties that are applied to a GeoView.

Returns
  • the selection properties

public abstract SpatialReference getSpatialReference ()

Gets the SpatialReference of this GeoView. The SpatialReference of a GeoView defines how the coordinates of the data correspond to locations in the real world.

Returns
  • the SpatialReference of this GeoView

public TimeExtent getTimeExtent ()

Gets the current time extent. The Time Extent of the GeoView defines how time-enabled data is displayed. Time filtering is applied by participating layers. See the TimeAware interface for details. Time filtering is not enabled until a non-null time extent is set on the GeoView. When the time extent is null on the GeoView, no time filtering is applied and all content is rendered.

Returns
  • the time extent, or null if no time extent is set

public ListenableFuture<IdentifyGraphicsOverlayResult> identifyGraphicsOverlayAsync (GraphicsOverlay graphicsOverlay, Point screenPoint, double tolerance, boolean returnPopupsOnly, int maximumResults)

Asynchronously identifies the visible graphics in the given graphics overlay, at the given screen point.

As locations from user gestures are not always accurate to the exact pixel, a tolerance for the identify can be defined. The tolerance parameter indicates the radius of a circle, centered at screenPoint, in density-independent pixels (dp). The results returned will include any visible graphics that, when rendered with the appropriate symbols, intersect this circle, up to the maximumResults parameter limit.

The identified graphic(s) are returned from getGraphics(), subject to the returnPopupsOnly parameter. If the overlay is an enabled PopupSource, then the getPopups() list will also contain pop-ups.

Parameters
graphicsOverlay the graphics overlay in which to identify graphics
screenPoint the screen point at which to identify graphics
tolerance the radius in density-independent pixels (dp) of a circle centered at screenPoint within which to identify graphics. A value of 0 will identify only the graphics at the physical pixel at screenPoint. The maximum allowed value is 100dp
returnPopupsOnly true to include pop-ups but no graphics in the identify results; false to include both graphics and pop-ups
maximumResults the maximum number of graphics and/or pop-ups to be returned; must be greater than zero with the exception that -1 can be used to indicate unlimited results
Returns
  • a ListenableFuture for tracking when the operation is done and getting the result; Add a listener to the future to be notified when the identify operation is complete. The result of the future is an IdentifyGraphicsOverlayResult object if the operation completed successfully
Throws
IllegalArgumentException if
  • graphicsOverlay is null
  • screenPoint is null
  • tolerance less than zero or greater than 100
  • maximumResults is zero or less than -1
ArcGISRuntimeException if screenPoint translates to a point outside the current Viewpoint of this GeoView

public ListenableFuture<IdentifyGraphicsOverlayResult> identifyGraphicsOverlayAsync (GraphicsOverlay graphicsOverlay, Point screenPoint, double tolerance, boolean returnPopupsOnly)

Asynchronously identifies the topmost visible graphic in the given graphics overlay, at the given screen point.

As locations from user gestures are not always accurate to the exact pixel, a tolerance for the identify can be defined. The tolerance parameter indicates the radius of a circle, centered at screenPoint, in density-independent pixels (dp). The result returned will include the topmost visible graphic that, when rendered with the appropriate symbol, intersects this circle.

The identified graphic is returned from getGraphics(), subject to the returnPopupsOnly parameter. If the overlay is an enabled PopupSource, then the getPopups() list will also contain a pop-up.

Parameters
graphicsOverlay the graphics overlay in which to identify the graphic
screenPoint the screen point in pixels at which to identify the graphic
tolerance the radius in density-independent pixels (dp) of a circle centered at screenPoint within which to identify graphics. A value of 0 will identify only the graphics at the physical pixel at screenPoint. The maximum allowed value is 100dp
returnPopupsOnly true to include a pop-up but no graphic in the identify results; false to include both a graphic and a pop-up
Returns
  • a ListenableFuture for tracking when the operation is done and getting the result; Add a listener to the future to be notified when the identify operation is complete. The result of the future is an IdentifyGraphicsOverlayResult object if the operation completed successfully
Throws
IllegalArgumentException if
  • graphicsOverlay is null
  • screenPoint is null
  • tolerance less than zero or greater than 100
ArcGISRuntimeException if screenPoint translates to a point outside the current Viewpoint of this GeoView

public ListenableFuture<List<IdentifyGraphicsOverlayResult>> identifyGraphicsOverlaysAsync (Point screenPoint, double tolerance, boolean returnPopupsOnly)

Asynchronously identifies the topmost visible graphic in each graphics overlay in this view, at the given screen point.

As locations from user gestures are not always accurate to the exact pixel, a tolerance for the identify can be defined. The tolerance parameter indicates the radius of a circle, centered at screenPoint, in density-independent pixels (dp). The result returned will include the topmost visible graphic per graphics overlay that, when rendered with the appropriate symbol, intersects this circle.

The identified graphic is returned from getGraphics(), subject to the returnPopupsOnly parameter. If an overlay is an enabled PopupSource, then the getPopups() list will also contain a pop-up.

Parameters
screenPoint the screen point at which to identify graphics
tolerance the radius in density-independent pixels (dp) of a circle centered at screenPoint within which to identify graphics. A value of 0 will identify only the graphics at the physical pixel at screenPoint. The maximum allowed value is 100dp
returnPopupsOnly true to include pop-ups but no graphics in the identify results; false to include both graphics and pop-ups
Returns
  • a ListenableFuture for tracking when the operation is done and getting the result; Add a listener to the future to be notified when the identify operation is complete. The result of the future is a list of IdentifyGraphicsOverlayResult objects if the operation completed successfully
Throws
IllegalArgumentException if
  • screenPoint is null
  • tolerance less than zero or greater than 100
ArcGISRuntimeException if screenPoint translates to a point outside the current Viewpoint of this GeoView

public ListenableFuture<List<IdentifyGraphicsOverlayResult>> identifyGraphicsOverlaysAsync (Point screenPoint, double tolerance, boolean returnPopupsOnly, int maximumResults)

Asynchronously identifies the visible graphics at the given screen point in all graphics overlays in this view.

As locations from user gestures are not always accurate to the exact pixel, a tolerance for the identify can be defined. The tolerance parameter indicates the radius of a circle, centered at screenPoint, in density-independent pixels (dp). The results returned will include any visible graphics that, when rendered with the appropriate symbols, intersect this circle, up to the maximumResults parameter limit.

The identified graphic(s) are returned from getGraphics(), subject to the returnPopupsOnly parameter. If an overlay is an enabled PopupSource, then the getPopups() list for that overlay will also contain pop-ups.

Parameters
screenPoint the screen point at which to identify graphics
tolerance the radius in density-independent pixels (dp) of a circle centered at screenPoint within which to identify graphics. A value of 0 will identify only the graphics at the physical pixel at screenPoint. The maximum allowed value is 100dp
returnPopupsOnly true to include pop-ups but no graphics in the identify results; false to include both graphics and pop-ups
maximumResults the maximum number of graphics and/or pop-ups to be returned; must be greater than zero with the exception that -1 can be used to indicate unlimited results
Returns
  • a ListenableFuture for tracking when the operation is done and getting the result; Add a listener to the future to be notified when the identify operation is complete. The result of the future is a list of IdentifyGraphicsOverlayResult objects if the operation completed successfully
Throws
IllegalArgumentException if
  • screenPoint is null
  • tolerance less than zero or greater than 100
  • maximumResults is zero or less than -1
ArcGISRuntimeException if screenPoint translates to a point outside the current Viewpoint of this GeoView

public ListenableFuture<IdentifyLayerResult> identifyLayerAsync (Layer layer, Point screenPoint, double tolerance, boolean returnPopupsOnly, int maximumResults)

Asynchronously identifies GeoElements in the given layer.

As locations from user gestures are not always accurate to the exact pixel, a tolerance for the identify can be defined. The tolerance parameter indicates the radius of a circle, centered at screenPoint, in density-independent pixels (dp). The results returned will include any visible GeoElements that, when rendered with the appropriate symbols, intersect this circle, up to the maximumResults parameter limit.

The identified geo-element is returned from getElements(), subject to the returnPopupsOnly parameter. If the layer is an enabled PopupSource, then the getPopups() list will also contain pop-ups.

Parameters
layer layer searched in the identify operation
screenPoint the screen point to identify on
tolerance the radius in density-independent pixels (dp) of a circle centered at screenPoint within which to identify GeoElements. A value of 0 will identify only the GeoElements at the physical pixel at screenPoint. The maximum allowed value is 100dp
returnPopupsOnly true to include pop-ups but no geo-elements in the identify results; false to include both geo-elements and pop-ups
maximumResults the maximum number of geo-elements and/or pop-ups to be returned; must be greater than zero with the exception that -1 can be used to indicate unlimited results
Returns
  • a ListenableFuture that provides an IdentifyLayerResult upon successful completion of the async operation
Throws
IllegalArgumentException if
  • layer is null
  • screenPoint is null
  • tolerance is less than zero or greater than 100
  • maximumResults is zero or less than -1
ArcGISRuntimeException if screenPoint translates to a point outside the current Viewpoint of this GeoView

public ListenableFuture<IdentifyLayerResult> identifyLayerAsync (Layer layer, Point screenPoint, double tolerance, boolean returnPopupsOnly)

Asynchronously identifies the topmost visible GeoElement in the given layer.

As locations from user gestures are not always accurate to the exact pixel, a tolerance for the identify can be defined. The tolerance parameter indicates the radius of a circle, centered at screenPoint, in density-independent pixels (dp). The result returned will include the topmost visible GeoElement that, when rendered with the appropriate symbol, intersects this circle.

The identified geo-element is returned from getElements(), subject to the returnPopupsOnly parameter. If the layer is an enabled PopupSource, then the getPopups() list will also contain a pop-up.

Parameters
layer layer searched in the identify operation
screenPoint the screen point to identify on
tolerance the radius in density-independent pixels (dp) of a circle centered at screenPoint within which to identify GeoElements. A value of 0 will identify only the GeoElements at the physical pixel at screenPoint. The maximum allowed value is 100dp
returnPopupsOnly true to include a pop-up but no geo-element in the identify results; false to include both a geo-element and a pop-up
Returns
  • a ListenableFuture that provides an IdentifyLayerResult upon successful completion of the async operation
Throws
IllegalArgumentException if
  • layer is null
  • screenPoint is null
  • tolerance is less than zero or greater than 100
ArcGISRuntimeException if screenPoint translates to a point outside the current Viewpoint of this GeoView

public ListenableFuture<List<IdentifyLayerResult>> identifyLayersAsync (Point screenPoint, double tolerance, boolean returnPopupsOnly, int maximumResults)

Asynchronously identifies GeoElements on all identifiable layers in the map.

As locations from user gestures are not always accurate to the exact pixel, a tolerance for the identify can be defined. The tolerance parameter indicates the radius of a circle, centered at screenPoint, in density-independent pixels (dp). The results returned will include any visible GeoElements that, when rendered with the appropriate symbols, intersect this circle, up to the maximumResults parameter limit.

The identified geo-element(s) for each layer are returned from getElements(), subject to the returnPopupsOnly parameter. If a layer is an enabled PopupSource, then the getPopups() list will also contain pop-ups.

Parameters
screenPoint the screen point to identify on
tolerance the radius in density-independent pixels (dp) of a circle centered at screenPoint within which to identify GeoElements. A value of 0 will identify only the GeoElements at the physical pixel at screenPoint. The maximum allowed value is 100dp
returnPopupsOnly true to include pop-ups but no geo-elements in the identify results; false to include both geo-elements and pop-ups
maximumResults the maximum number of geo-elements and/or pop-ups to be returned; must be greater than zero with the exception that -1 can be used to indicate unlimited results
Returns
  • a ListenableFuture that provides an unmodifiable list of IdentifyLayerResults upon successful completion of the async operation. The list contains an IdentifyLayerResult for each layer in which geo-elements were identified; layers with no identified geo-elements are not represented in the list
Throws
IllegalArgumentException if
  • screenPoint is null
  • tolerance is less than zero or greater than 100
  • maximumResults is zero or less than -1
ArcGISRuntimeException if screenPoint translates to a point outside the current Viewpoint of this GeoView

public ListenableFuture<List<IdentifyLayerResult>> identifyLayersAsync (Point screenPoint, double tolerance, boolean returnPopupsOnly)

Asynchronously identifies the topmost visible GeoElement in each identifiable layer in the map.

As locations from user gestures are not always accurate to the exact pixel, a tolerance for the identify can be defined. The tolerance parameter indicates the radius of a circle, centered at screenPoint, in density-independent pixels (dp). The result returned will include the topmost visible GeoElement per layer that, when rendered with the appropriate symbol, intersects this circle.

The identified geo-element for each layer is returned from getElements(), subject to the returnPopupsOnly parameter. If a layer is an enabled PopupSource, then the getPopups() list will also contain a pop-up.

Parameters
screenPoint the screen point to identify on
tolerance the radius in density-independent pixels (dp) of a circle centered at screenPoint within which to identify geo-elements. A value of 0 will identify only the geo-element at the physical pixel at screenPoint. TThe maximum allowed value is 100dp
returnPopupsOnly true to include a pop-up but no geo-element in the identify results for each layer; false to include both a geo-element and a pop-up
Returns
  • a ListenableFuture that provides an unmodifiable list of IdentifyLayerResults upon successful completion of the async operation. The list contains an IdentifyLayerResult for each layer in which a geo-element was identified; layers with no identified geo-element are not represented in the list
Throws
IllegalArgumentException if
  • screenPoint is null
  • tolerance is less than zero or greater than 100
ArcGISRuntimeException if screenPoint translates to a point outside the current Viewpoint of this GeoView

public boolean isAttributionTextVisible ()

Indicates whether the Esri attribution text is visible or not. The Esri attribution text is shown as a semi-transparent view at the bottom of the GeoView spanning its full width.

Returns
  • true if the attribution text is visible; false otherwise. Default it true.

public boolean isNavigating ()

Indicates if the viewpoint of the map is currently being changed. Reflects both animation of programmatic changes to the map viewpoint, and user interaction with the map.

Returns
  • true, if this map is currently animating a viewpoint change, or a map navigation gesture is in progress; false otherwise

public boolean isWrapAroundEnabled ()

Indicates whether wrap around map display is enabled or not. When enabled, the map can be panned continuously across the anti-meridian, and the eastern and western hemispheres wrap to form a continuous map, giving the impression that the map is endless.

To enable wrap around map display for a MapView, call setWrapAroundMode(WrapAroundMode) and pass in ENABLE_WHEN_SUPPORTED. Note that there are some requirements for the map in this case; see ENABLE_WHEN_SUPPORTED for more information.

Note that if wrap around display is enabled, geometries returned from getVisibleArea may have coordinates outside the domain of the spatial reference of the map. Before using such geometries to perform spatial queries, address finding, or as feature geometries in a geodatabase, they should be normalized to lie within the spatial reference domain.

Returns
  • true if the map is currently displayed wrapped around; false otherwise

public void pause ()

Pauses the drawing of the GeoView.

This can be used to save resources when your application is minimized for example. Call this in the parent activity's onPause method. Ensure you have a corresponding call to resume().

public boolean removeAttributionTextChangedListener (AttributionTextChangedListener listener)

Unregisters an AttributionTextChangedListener that was previously added using addAttributionTextChangedListener(AttributionTextChangedListener).

Parameters
listener the listener to unregister
Returns
  • true if the listener was successfully removed; false otherwise
Throws
NullPointerException if the argument is null

public void removeAttributionViewLayoutChangeListener (View.OnLayoutChangeListener layoutChangeListener)

Unregisters a listener for the attribution view layout changes.

Parameters
layoutChangeListener the listener for layout bounds change
Throws
IllegalArgumentException if layoutChangeListener is null

public boolean removeDrawStatusChangedListener (DrawStatusChangedListener listener)

Unregisters the given DrawStatusChangedListener that was previously added using addDrawStatusChangedListener(DrawStatusChangedListener).

Parameters
listener the listener to unregister
Returns
  • true if the listener was successfully removed; false otherwise
Throws
NullPointerException if the argument is null

public boolean removeLayerViewStateChangedListener (LayerViewStateChangedListener listener)

Unregisters the given LayerViewStateChangedListener that was previously added using addLayerViewStateChangedListener(LayerViewStateChangedListener).

Parameters
listener the listener to unregister
Returns
  • true if the listener was successfully removed; false otherwise
Throws
NullPointerException if the argument is null

public boolean removeNavigationChangedListener (NavigationChangedListener listener)

Unregisters the given NavigationChangedListener that was previously added using addNavigationChangedListener(NavigationChangedListener).

Parameters
listener the listener to unregister
Returns
  • true if the listener was successfully removed; false otherwise

public boolean removeSpatialReferenceChangedListener (SpatialReferenceChangedListener listener)

Unregisters the given SpatialReferenceChangedListener that was previously added using addSpatialReferenceChangedListener(SpatialReferenceChangedListener).

Parameters
listener the listener to unregister
Returns
  • true if the listener was successfully removed; false otherwise
Throws
NullPointerException if the listener is null

public boolean removeViewpointChangedListener (ViewpointChangedListener listener)

Unregisters a ViewpointChangedListener that was previously added using addViewpointChangedListener(ViewpointChangedListener).

Parameters
listener the listener to unregister
Returns
  • true if the listener was successfully removed; false otherwise

public void resume ()

Resumes the drawing of the GeoView that has been paused, restarting the display of the contained ArcGISMap. You can call this in the parent activity's onResume method, after a corresponding call to pause().

public void setAttributionTextVisible (boolean visible)

Sets the visibility of the Esri attribution text, this is visible by default. The Esri attribution text is shown as a semi-transparent view at the base of the GeoView spanning its full width.

Parameters
visible true to set attribution text visible; false otherwise

public ListenableFuture<Boolean> setBookmarkAsync (Bookmark bookmark)

Asynchronously sets the bookmark, which consequently applies the viewpoint within the bookmark to the GeoView.

Parameters
bookmark bookmark to set
Returns
  • a ListenableFuture. Add a listener to this to know when the operation is complete. The result of the future indicates whether the bookmark was set
Throws
IllegalArgumentException if bookmark is null

public void setTimeExtent (TimeExtent timeExtent)

Sets the time extent of the GeoView. The Time Extent of the GeoView defines how time-enabled data is displayed. Time filtering is applied by participating layers. See the TimeAware interface for details. Time filtering is not enabled until a non-null time extent is set on the GeoView. When the time extent is null on the GeoView, no time filtering is applied and all content is rendered.

Parameters
timeExtent the time extent

public void setViewpoint (Viewpoint viewpoint)

Zooms and/or pans the map to the given Viewpoint. This method does not use animation - the viewpoint is updated instantaneously.

Parameters
viewpoint the new Viewpoint
Throws
IllegalArgumentException if the argument is null

public ListenableFuture<Boolean> setViewpointAsync (Viewpoint viewpoint, float durationSeconds)

Asynchronously zooms and/or pans the map or scene to the given Viewpoint, taking the given number of seconds to complete the navigation. Alternatively use setViewpointAsync(Viewpoint) to use the standard duration.

Parameters
viewpoint the new Viewpoint
durationSeconds the duration of the animation to the new Viewpoint, in seconds
Returns
  • a ListenableFuture representing the result of the Viewpoint change. Add a listener to the future to be notified when animation is finished. The result of the future indicates if the operation completed successfully.
Throws
IllegalArgumentException if viewpoint is null

public ListenableFuture<Boolean> setViewpointAsync (Viewpoint viewpoint)

Asynchronously zooms and/or pans the map or scene to the given Viewpoint. This method uses the standard animation duration; alternatively use setViewpointAsync(Viewpoint, float) to control the animation duration.

Parameters
viewpoint the new Viewpoint
Returns
  • a ListenableFuture representing the result of the Viewpoint change. Add a listener to the future to be notified when animation is finished. The result of the future indicates if the operation completed successfully.
Throws
IllegalArgumentException if the argument is null

Protected Methods

protected abstract void onDrawFrame (GL10 gl)

Called to draw the current frame.

Parameters
gl the GL interface