Symbol QML Type

  • Esri.ArcGISRuntime
  • Symbol
  • Base type for symbols used to display a graphic or a feature. More...

    Import Statement: import Esri.ArcGISRuntime
    Since: Esri.ArcGISRuntime 100.0
    Inherits:

    Object

    Inherited By:

    CompositeSymbol, DistanceCompositeSceneSymbol, FillSymbol, LineSymbol, MarkerSceneSymbol, MarkerSymbol, and MultilayerSymbol

    Properties

    Signals

    Methods

    Detailed Description

    A symbol defines display properties for features and graphics (collectively referred to as geoelements). A geoelement has a geometry (location and shape), and optional descriptive information. For features and graphics to appear on a map, they must be assigned a symbol.

    There are two models for defining symbols in your map: simple and advanced (multilayer). In general, simple symbols are single-layer symbols that provide basic represetations, such as marker, line, fill, text, or picture. Advanced symbols are composed of one or several layers that can be defined individually and combined to create complex representations.

    Both of these are more fully described as follows:

    • Simple symbols follow the web map specification and you work with them through the simple symbol classes. These are also the symbols you get from web maps or from feature services when advanced symbology is turned off. Simple symbols can be created for points (marker symbols), lines (line symbols), and polygons (fill symbols). Each of the simple symbol types provides an enumeration of pre-defined styles that can be applied to the symbol.
    • Advanced symbols, accessed through multilayer symbol classes, follow the ArcGIS Pro symbol model. These symbols come from feature services (that use advanced symbology), mobile style files, the dictionary renderer, and mobile map packages. You can also build your own advanced symbols for points, lines, and polygons.

    Simple symbology is the symbology of the web map. When authoring maps in ArcGIS Pro as web maps, your multilayer symbols will be converted to simple symbols. In general, point symbols are converted to picture marker symbols optimized for the web, and line and polygon symbols are simplified while representing the original symbol as closely as possible. If you're authoring a feature service from ArcGIS Pro or ArcGIS Desktop, however, both the original symbols and the simplified symbols are stored. This allows clients that support advanced symbols to render the features as originally symbolized, while those that do not support advanced symbols (such as ArcGIS Online Map Viewer) can use the simple symbols for display. Having both sets of symbols allows you to retain the advanced symbology where available and still share the feature service as widely as possible.

    If your app works primarily with web maps that you want to look the same throughout the platform, your app should use the simple symbols API. Otherwise, make sure your users understand that advanced symbols render slightly differently on clients that don't support advanced symbology.

    If your maps are used only with this API and ArcGIS Pro, you can use advanced symbols exclusively. When rendered by this API, advanced symbols are vectorized. This allows them to scale better on devices with high resolution screens.

    You can set LoadSettings::useAdvancedSymbology to control whether the map uses advanced symbols (when available) or always renders with simple symbols.

    Note: You cannot declare or create a component of this type in QML code.

    See also JsonSerializable.

    Property Documentation

    json : jsobject

    JSON that can be used to instantiate the type instance.

    Sizes of symbols in JSON are represented in points (not pixels). Symbol layers in a multilayer symbol are in reverse order of how they appear in the JSON representation.

    Note: For Symbols of type MarkerSymbol, an angle set from JSON will be inverted (e.g. an angle of 20 will become -20).


    [read-only] swatchImage : url

    Returns the image URL to the symbol's swatch image (read-only).

    Accessing this property will force the swatch image to be created.


    [read-only] swatchOptions : SwatchOptions

    Returns the configuration options for the swatch image (read-only).

    If these options are a changed a new swatchImage will be generated.


    [read-only] symbolType : Enums.SymbolType

    Returns the symbol type (read-only).

    See also Enums.SymbolType.


    [read-only] unknownJson : jsobject

    Returns the unknown JSON from the source JSON.

    See also JsonSerializable.


    [read-only] unsupportedJson : jsobject

    Returns the unsupported data from the source JSON.

    See also JsonSerializable.


    Signal Documentation

    swatchImageChanged()

    Emitted when the swatchImage property changes.

    Note: The corresponding handler is onSwatchImageChanged.


    Method Documentation

    [since Esri.ArcGISRuntime 200.1] Symbol clone()

    Creates a deep copy of this object.

    This method was introduced in Esri.ArcGISRuntime 200.1.


    void createSwatch()

    Creates a swatch image using the provided swatchOptions.

    This method initiates a request to create a swatch image from this symbol. Once completed, the swatchImage property is updated with a URL pointing to a path handled by the image provider. The swatchImageChanged signal is emitted whenever the swatchImage changes.

    If no swatchOptions have been provided then the defaults are used.

    See also SwatchOptions.


    [since Esri.ArcGISRuntime 200.1] bool equals(Symbol other)

    Compares two Symbols for equality.

    Returns whether this instance and other are equivalent.

    This method was introduced in Esri.ArcGISRuntime 200.1.


    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.