ArcGIS Runtime SDK for macOS

Distance composite symbol


This sample demonstrates how to create a graphic using a distance composite scene symbol.

Distance composite symbol

How it works

Distance composite scene symbols can render different symbols depending on the distance between the camera and the graphic. The symbol of the graphic will change while zooming in or out.

To create and display a AGSDistanceCompositeSceneSymbol:

  1. Create an AGSGraphicsOverlay and add it to the AGSSceneView.
  2. Create symbols for each AGSRange of the composite symbol.
  3. Create a distance composite scene symbol.
  4. Create a range for each symbol using AGSDistanceSymbolRange(symbol:minDistance:maxDistance:).
    • symbol: A symbol to be used within the given min/max range.
    • min/max distance: The minimum and maximum distance from the AGSCamera for which the symbol will be shown.
  5. Set the distance composite scene symbol ranges using AGSDistanceCompositeSceneSymbol.ranges.
  6. Create an AGSGraphic with the symbol: AGSGraphic(geometry:symbol:attributes:)
  7. Add the graphic to the graphics overlay.

In this topic
  1. Description