require(["esri/renderers/smartMapping/symbology/location"], function(locationSchemes) { /* code goes here */ });
Object: esri/renderers/smartMapping/symbology/location
Since: ArcGIS API for JavaScript 4.2

Object containing helper methods for generating optimal symbols for location-only visualizations. The getSchemes() method is used to generate symbol properties best suited to the given geometry type and basemap.

Method Overview

NameReturn TypeSummaryObject
LocationScheme

Clones a location scheme object.

more details
more detailslocation
LocationSchemes

Returns a primary scheme and secondary schemes defining symbol properties for location-only visualizions in a FeatureLayer or SceneLayer.

more details
more detailslocation

Method Details

cloneScheme(scheme){LocationScheme}

Clones a location scheme object.

Parameter:

The location scheme object to clone.

Returns:
TypeDescription
LocationSchemeReturns a clone of the given location scheme object.
Example:
// clones the primary scheme returned from the getSchemes() method
var locationScheme = primaryScheme.clone();
getSchemes(params){LocationSchemes}

Returns a primary scheme and secondary schemes defining symbol properties for location-only visualizions in a FeatureLayer or SceneLayer. The basemap parameter determines the color of the graphics used to visualize each feature. The geometryType determines which type of symbol to return.

Parameters:
params Object

See the table below for details of each parameter that may be passed to this function.

Specification:
basemap String|Basemap

The basemap to pair with the visualization. This value indicates the best symbol color for visualizing features on top of the given basemap.

geometryType String

The geometry type of the features to visualize.

Possible Values: point | multipoint | polyline | polygon | mesh

optional

The SceneView instance in which the scheme will be used. This property is only applicable when the scheme will be used in conjunction with 3D symbols.

worldScale Boolean
optional

Indicates if the size units of the scheme will be in meters. This should be true when the scheme is intended for 3D volumetric symbology. A view must be provided if this property is set to true.

Returns:
TypeDescription
LocationSchemesReturns an object containing the optimal location scheme (and secondary schemes) to use for the given basemap.
Example:
// gets the primary scheme for the features of the given geometry type and basemap
var schemes = locationSchemes.getSchemes({
  basemap: map.basemap,
  geometryType: featureLayer.geometryType
});

// the best default scheme for the layer, basemap, and theme
var primaryScheme = schemes.primaryScheme;

Type Definitions

Defines the symbology scheme used to visualize default location-based symbols depending on the layer's geometry type.

LocationSchemeForMesh

Properties defining the location-only symbology scheme used to visualize mesh features.

Properties:
color Color

The color of the fill symbol.

opacity Number

The opacity of the fill symbol.

LocationSchemeForPoint

Properties defining the location-only symbology scheme used to visualize point features.

Properties:
color Color

The fill color of the marker symbol.

outline Object

Properties for defining the outline of the marker symbol.

Specification:
color Color

The outline color of the marker symbol.

width Number

The width of the marker symbol in pixels or points.

size Number

The size of the marker symbol in pixels or points.

opacity Number

The opacity of the marker symbol.

LocationSchemeForPolygon

Properties defining the location-only symbology scheme used to visualize polygon features.

Properties:
color Color

The color of the fill symbol.

outline Object

Properties for defining the outline of the fill symbol.

Specification:
color Color

The outline color of the fill symbol.

width Number

The width of the fill symbol in pixels or points.

opacity Number

The opacity of the fill symbol.

LocationSchemeForPolyline

Properties defining the location-only symbology scheme used to visualize polyline features.

Properties:
color Color

The color of the line symbol.

width Number

The width of the line symbol in pixels or points.

opacity Number

The opacity of the line symbol.

LocationSchemes

The return object of the getSchemes() method.

Properties:
primaryScheme LocationScheme

The location scheme best suited for the given basemap and geometry type.

secondarySchemes LocationScheme[]

Additional location schemes that may be used to visualize data of the given geometry type overlaid on the given basemap.

basemapId String

The ID of the basemap associated with the given schemes.

API Reference search results

NameTypeModule
Loading...