-
Notifications
You must be signed in to change notification settings - Fork 120
ProSnippets MapAuthoring
Language: C#
Subject: MapAuthoring
Contributor: ArcGIS Pro SDK Team <[email protected]>
Organization: Esri, http://www.esri.com
Date: 7/13/2015
ArcGIS Pro: ArcGIS Pro 1.1
Visual Studio: Visual Studio 2013
##How to get a style in project
//Get all styles in the project
var styles = Project.Current.GetItems<StyleProjectItem>();
//Get a specific style in the project
StyleProjectItem style = styles.First(x => x.Name == "NameOfTheStyle");
##How to create a new style
//Full path for the new style file (.stylx) to be created
string styleToCreate = @"C:\Temp\NewStyle.stylx";
await Project.Current.CreateStyleAsync(styleToCreate);
##How to add a style to project
//For core ArcGIS Pro styles, just pass in the name of the style to add to the project
await Project.Current.AddStyleAsync("3D Vehicles");
//For custom styles, pass in the full path to the style file on disk
string customStyleToAdd = @"C:\Temp\CustomStyle.stylx";
await Project.Current.AddStyleAsync(customStyleToAdd);
##How to remove a style from project
//For core ArcGIS Pro styles, just pass in the name of the style to remove from the project
await Project.Current.RemoveStyleAsync("3D Vehicles");
//For custom styles, pass in the full path to the style file on disk
string customStyleToRemove = @"C:\Temp\CustomStyle.stylx";
await Project.Current.RemoveStyleAsync(customStyleToRemove);
##How to construct a point symbol of a specific color and size
CIMPointSymbol pointSymbol = await QueuedTask.Run<CIMPointSymbol>(() =>
{
return SymbolFactory.ConstructPointSymbol(ColorFactory.Red, 10.0);
});
##How to construct a point symbol of a specific color, size and shape
CIMPointSymbol starPointSymbol = await QueuedTask.Run<CIMPointSymbol>(() =>
{
return SymbolFactory.ConstructPointSymbol(ColorFactory.Red, 10.0, SimpleMarkerStyle.Star);
});
##How to construct a point symbol from a marker
//Construct the marker
CIMMarker marker = await QueuedTask.Run<CIMMarker>(() =>
{
return SymbolFactory.ConstructMarker(ColorFactory.Green, 8.0, SimpleMarkerStyle.Pushpin);
});
CIMPointSymbol pointSymbolFromMarker = SymbolFactory.ConstructPointSymbol(marker);
##How to construct a point symbol from a file on disk
//Following file formats can be used to create the marker: DAE, 3DS, FLT, EMF, JPG, PNG, BMP, GIF
CIMMarker markerFromFile = await SymbolFactory.ConstructMarkerFromFileAsync(@"C:\Temp\fileName.dae");
CIMPointSymbol pointSymbolFromFile = SymbolFactory.ConstructPointSymbol(markerFromFile);
##How to construct a polygon symbol of specific color and fill style
CIMPolygonSymbol polygonSymbol = SymbolFactory.ConstructPolygonSymbol(ColorFactory.Red, SimpleFillStyle.Solid);
##How to construct a polygon symbol of specific color, fill style and outline
CIMStroke outline = SymbolFactory.ConstructStroke(ColorFactory.Blue, 2.0, SimpleLineStyle.Solid);
CIMPolygonSymbol fillWithOutline = SymbolFactory.ConstructPolygonSymbol(ColorFactory.Red, SimpleFillStyle.Solid, outline);
##How to construct a polygon symbol without an outline
CIMPolygonSymbol fillWithoutOutline = SymbolFactory.ConstructPolygonSymbol(ColorFactory.Red, SimpleFillStyle.Solid, null);
##How to construct a line symbol of specific color, size and line style
CIMLineSymbol lineSymbol = SymbolFactory.ConstructLineSymbol(ColorFactory.Blue, 4.0, SimpleLineStyle.Solid);
##How to construct a line symbol from a stroke
CIMStroke stroke = SymbolFactory.ConstructStroke(ColorFactory.Black, 2.0);
CIMLineSymbol lineSymbolFromStroke = SymbolFactory.ConstructLineSymbol(stroke);
##How to get symbol reference from a symbol
CIMPolygonSymbol symbol = SymbolFactory.ConstructPolygonSymbol(ColorFactory.Red);
//Get symbol reference from the symbol
CIMSymbolReference symbolReference = symbol.MakeSymbolReference();
##How to add a style item to a style
public Task AddStyleItemAsync(StyleProjectItem style, StyleItem itemToAdd)
{
return QueuedTask.Run(() =>
{
if (style == null || itemToAdd == null)
throw new System.ArgumentNullException();
//Add the item to style
style.AddItem(itemToAdd);
});
}
##How to remove a style item from a style
public Task RemoveStyleItemAsync(StyleProjectItem style, StyleItem itemToRemove)
{
return QueuedTask.Run(() =>
{
if (style == null || itemToRemove == null)
throw new System.ArgumentNullException();
//Remove the item from style
style.RemoveItem(itemToRemove);
});
}
##How to search for a specific item in a style
public Task<SymbolStyleItem> GetSymbolFromStyleAsync(StyleProjectItem style, string key)
{
return QueuedTask.Run(() =>
{
if (style == null)
throw new System.ArgumentNullException();
//Search for a specific point symbol in style
SymbolStyleItem item = (SymbolStyleItem)style.LookupItem(StyleItemType.PointSymbol, key);
return item;
});
}
##How to search for point symbols in a style
public Task<IList<SymbolStyleItem>> GetPointSymbolsFromStyleAsync(StyleProjectItem style, string searchString)
{
if (style == null)
throw new System.ArgumentNullException();
//Search for point symbols
return style.SearchSymbolsAsync(StyleItemType.PointSymbol, searchString);
}
##How to search for line symbols in a style
public Task<IList<SymbolStyleItem>> GetLineSymbolsFromStyleAsync(StyleProjectItem style, string searchString)
{
if (style == null)
throw new System.ArgumentNullException();
//Search for line symbols
return style.SearchSymbolsAsync(StyleItemType.LineSymbol, searchString);
}
##How to search for polygon symbols in a style
public Task<IList<SymbolStyleItem>> GetPolygonSymbolsFromStyleAsync(StyleProjectItem style, string searchString)
{
if (style == null)
throw new System.ArgumentNullException();
//Search for polygon symbols
return style.SearchSymbolsAsync(StyleItemType.PolygonSymbol, searchString);
}
##How to search for colors in a style
public Task<IList<ColorStyleItem>> GetColorsFromStyleAsync(StyleProjectItem style, string searchString)
{
if (style == null)
throw new System.ArgumentNullException();
//Search for colors
return style.SearchColorsAsync(searchString);
}
##How to search for color ramps in a style
public Task<IList<ColorRampStyleItem>> GetColorRampsFromStyleAsync(StyleProjectItem style, string searchString)
{
if (style == null)
throw new System.ArgumentNullException();
//Search for color ramps
return style.SearchColorRampsAsync(searchString);
}
##How to search for north arrows in a style
public Task<IList<NorthArrowStyleItem>> GetNorthArrowsFromStyleAsync(StyleProjectItem style, string searchString)
{
if (style == null)
throw new System.ArgumentNullException();
//Search for north arrows
return style.SearchNorthArrowsAsync(searchString);
}
##How to search for scale bars in a style
public Task<IList<ScaleBarStyleItem>> GetScaleBarsFromStyleAsync(StyleProjectItem style, string searchString)
{
if (style == null)
throw new System.ArgumentNullException();
//Search for scale bars
return style.SearchScaleBarsAsync(searchString);
}
##How to search for label placements in a style
public Task<IList<LabelPlacementStyleItem>> GetLabelPlacementsFromStyleAsync(StyleProjectItem style, string searchString)
{
if (style == null)
throw new System.ArgumentNullException();
//Search for standard label placement
return style.SearchLabelPlacementsAsync(StyleItemType.StandardLabelPlacement, searchString);
}
##How to set symbol for a feature layer symbolized with simple renderer
public Task SetFeatureLayerSymbolAsync(FeatureLayer ftrLayer, CIMSymbol symbolToApply)
{
if (ftrLayer == null || symbolToApply == null)
throw new System.ArgumentNullException();
return QueuedTask.Run(() => {
//Get simple renderer from the feature layer
CIMSimpleRenderer currentRenderer = ftrLayer.GetRenderer() as CIMSimpleRenderer;
if (currentRenderer == null)
return;
//Set symbol's real world setting to be the same as that of the feature layer
symbolToApply.SetRealWorldUnits(ftrLayer.UsesRealWorldSymbolSizes);
//Update the symbol of the current simple renderer
currentRenderer.Symbol = symbolToApply.MakeSymbolReference();
//Update the feature layer renderer
ftrLayer.SetRenderer(currentRenderer);
});
}
##How to apply a symbol from style to a feature layer
public Task SetFeatureLayerSymbolFromStyleItemAsync(FeatureLayer ftrLayer, SymbolStyleItem symbolItem)
{
if (ftrLayer == null || symbolItem == null)
throw new System.ArgumentNullException();
return QueuedTask.Run(() =>
{
//Get simple renderer from the feature layer
CIMSimpleRenderer currentRenderer = ftrLayer.GetRenderer() as CIMSimpleRenderer;
if (currentRenderer == null)
return;
//Get symbol from the SymbolStyleItem
CIMSymbol symbol = symbolItem.Symbol;
//Set symbol's real world setting to be the same as that of the feature layer
symbol.SetRealWorldUnits(ftrLayer.UsesRealWorldSymbolSizes);
//Update the symbol of the current simple renderer
currentRenderer.Symbol = symbol.MakeSymbolReference();
//Update the feature layer renderer
ftrLayer.SetRenderer(currentRenderer);
});
}
##Get the active map
Map map = MapView.Active.Map;
##Create a new map with a default basemap layer
await QueuedTask.Run(() =>
{
var map = MapFactory.CreateMap(mapName, basemap: Basemap.ProjectDefault);
//TODO: use the map...
});
##Find a map within a project and open it
public static async Task<Map> FindOpenExistingMapAsync(string mapName) {
return await QueuedTask.Run(async () => {
Map map = null;
Project proj = Project.Current;
//Finding the first project item with name matches with mapName
MapProjectItem mpi =
proj.GetItems<MapProjectItem>()
.FirstOrDefault(m => m.Name.Equals(mapName, StringComparison.CurrentCultureIgnoreCase));
if (mpi != null) {
map = mpi.GetMap();
//Opening the map in a mapview
await ProApp.Panes.CreateMapPaneAsync(map);
}
return map;
});
}
##Open a webmap
Map map = null;
//Assume we get the selected webmap from the Project pane's Portal tab
if (Project.Current.SelectedItems.Count > 0) {
if (MapFactory.CanCreateMapFrom(Project.Current.SelectedItems[0])) {
map = await MapFactory.CreateMapAsync(Project.Current.SelectedItems[0]);
await ProApp.Panes.CreateMapPaneAsync(map);
}
}
##Get Map Panes
public static IEnumerable<IMapPane> GetMapPanes() {
//Sorted by Map Uri
return ProApp.Panes.OfType<IMapPane>().OrderBy((mp) => mp.MapView.Map.URI ?? mp.MapView.Map.Name);
}
##Get The Unique List of Maps From the Map Panes
public static IReadOnlyList<Map> GetMapsFromMapPanes()
{
//Gets the unique list of Maps from all the MapPanes.
//Note: The list of maps retrieved from the MapPanes
//maybe less than the total number of Maps in the project.
//It depends on what maps the user has actually opened.
var mapPanes = ProApp.Panes.OfType<IMapPane>()
.GroupBy((mp) => mp.MapView.Map.URI).Select(grp => grp.FirstOrDefault());
List<Map> uniqueMaps = new List<Map>();
foreach (var pane in mapPanes)
uniqueMaps.Add(pane.MapView.Map);
return uniqueMaps;
}
##Find a layers using partial name search
Map map = MapView.Active.Map;
IEnumerable<Layer> matches = map.GetLayersAsFlattenedList().Where(l => l.Name.IndexOf(partialName, StringComparison.CurrentCultureIgnoreCase) >= 0);
##Create and add a layer to the active map
/*
* string url = @"c:\data\project.gdb\DEM"; //Raster dataset from a FileGeodatabase
* string url = @"c:\connections\mySDEConnection.sde\roads"; //FeatureClass of a SDE
* string url = @"c:\connections\mySDEConnection.sde\States\roads"; //FeatureClass within a FeatureDataset from a SDE
* string url = @"c:\data\roads.shp"; //Shapefile
* string url = @"c:\data\imagery.tif"; //Image from a folder
* string url = @"c:\data\mySDEConnection.sde\roads"; //.lyrx or .lpkx file
* string url = @"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer"; //map service
* string url = @"http://sampleserver6.arcgisonline.com/arcgis/rest/services/NapervilleShelters/FeatureServer/0"; //FeatureLayer off a map service or feature service
*/
string url = @"c:\data\project.gdb\roads"; //FeatureClass of a FileGeodatabase
Uri uri = new Uri(url);
await QueuedTask.Run(() => LayerFactory.CreateLayer(uri, MapView.Active.Map));
##Create a feature layer with class breaks renderer with defaults
await QueuedTask.Run(() =>
LayerFactory.CreateFeatureLayer(
new Uri(@"c:\data\countydata.gdb\counties"),
MapView.Active.Map,
layerName: "Population Density (sq mi) Year 2010",
rendererDefinition: new GraduatedColorsRendererDefinition("POP10_SQMI")
)
);
##Create a feature layer with class breaks renderer
string colorBrewerSchemesName = "ColorBrewer Schemes (RGB)";
StyleProjectItem style = Project.Current.GetItems<StyleProjectItem>().First(s => s.Name == colorBrewerSchemesName);
string colorRampName = "Greens (Continuous)";
IList<ColorRampStyleItem> colorRampList = await style.SearchColorRampsAsync(colorRampName);
ColorRampStyleItem colorRamp = colorRampList[0];
await QueuedTask.Run(() =>
{
GraduatedColorsRendererDefinition gcDef = new GraduatedColorsRendererDefinition()
{
ClassificationField = "CROP_ACR07",
ClassificationMethod = ArcGIS.Core.CIM.ClassificationMethod.NaturalBreaks,
BreakCount = 6,
ColorRamp = colorRamp.ColorRamp,
SymbolTemplate = SymbolFactory.ConstructPolygonSymbol(
ColorFactory.Green, SimpleFillStyle.Solid, null).MakeSymbolReference(),
ExclusionClause = "CROP_ACR07 = -99",
ExclusionSymbol = SymbolFactory.ConstructPolygonSymbol(
ColorFactory.Red, SimpleFillStyle.Solid, null).MakeSymbolReference(),
ExclusionLabel = "No yield",
};
LayerFactory.CreateFeatureLayer(new Uri(@"c:\Data\CountyData.gdb\Counties"),
MapView.Active.Map, layerName: "Crop", rendererDefinition: gcDef);
});
##Set unique value renderer to the selected feature layer of the active map
await QueuedTask.Run(() => {
String[] fields = new string[] { "Type" }; //field to be used to retrieve unique values
CIMPointSymbol pointSym = SymbolFactory.ConstructPointSymbol(
ColorFactory.Green, 16.0, SimpleMarkerStyle.Pushpin); //construting a point symbol as a template symbol
CIMSymbolReference symbolPointTemplate = pointSym.MakeSymbolReference();
//constructing rederer definition for unique value renderer
UniqueValueRendererDefinition uniqueValueRendererDef = new UniqueValueRendererDefinition(fields, symbolPointTemplate);
//creating a unique value renderer
var flyr = MapView.Active.GetSelectedLayers()[0] as FeatureLayer;
CIMUniqueValueRenderer uniqueValueRenderer = (CIMUniqueValueRenderer)flyr.CreateRenderer(uniqueValueRendererDef);
//setting the renderer to the feature layer
flyr.SetRenderer(uniqueValueRenderer);
});
##Create a query layer
await QueuedTask.Run(() =>
{
Map map = MapView.Active.Map;
Geodatabase geodatabase = new Geodatabase(@"C:\Connections\mySDE.sde");
CIMSqlQueryDataConnection sqldc = new CIMSqlQueryDataConnection()
{
WorkspaceConnectionString = geodatabase.GetConnectionString(),
GeometryType = esriGeometryType.esriGeometryPolygon,
OIDFields = "OBJECTID",
Srid = "102008",
SqlQuery = "select * from MySDE.dbo.STATES"
};
FeatureLayer flyr = (FeatureLayer)LayerFactory.CreateLayer(sqldc, map, layerName: "States");
});
##Change Geodatabase Version of layers off a specified version in a map using version name
await QueuedTask.Run(() =>
{
//Getting the current version name from the first feature layer of the map
FeatureLayer flyr = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault(); //first feature layer
Datastore dataStore = flyr.GetFeatureClass().GetDatastore(); //getting datasource
Geodatabase geodatabase = dataStore as Geodatabase; //casting to Geodatabase
if (geodatabase == null)
return;
VersionManager versionManager = geodatabase.GetVersionManager();
String currentVersionName = versionManager.GetCurrentVersion().GetName();
//Getting all available versions except the current one
IEnumerable<ArcGIS.Core.Data.Version> versions = versionManager.GetVersions().Where(v => !v.GetName().Equals(currentVersionName, StringComparison.CurrentCultureIgnoreCase));
//Assuming there is at least one other version we pick the first one from the list
ArcGIS.Core.Data.Version toVersion = versions.FirstOrDefault();
if (toVersion != null) {
//Changing version
MapView.Active.Map.ChangeVersion(currentVersionName, toVersion.GetName());
}
});
##Change Geodatabase Version of layers off a specified version in a map
await QueuedTask.Run(() =>
{
//Getting the current version name from the first feature layer of the map
FeatureLayer flyr = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault(); //first feature layer
Datastore dataStore = flyr.GetFeatureClass().GetDatastore(); //getting datasource
Geodatabase geodatabase = dataStore as Geodatabase; //casting to Geodatabase
if (geodatabase == null)
return;
VersionManager versionManager = geodatabase.GetVersionManager();
ArcGIS.Core.Data.Version currentVersion = versionManager.GetCurrentVersion();
//Getting all available versions except the current one
IEnumerable<ArcGIS.Core.Data.Version> versions = versionManager.GetVersions().Where(v => !v.GetName().Equals(currentVersion.GetName(), StringComparison.CurrentCultureIgnoreCase));
//Assuming there is at least one other version we pick the first one from the list
ArcGIS.Core.Data.Version toVersion = versions.FirstOrDefault();
if (toVersion != null) {
//Changing version
MapView.Active.Map.ChangeVersion(currentVersion, toVersion);
}
});
##Querying a feature layer
var count = await QueuedTask.Run(() =>
{
QueryFilter qf = new QueryFilter() {
WhereClause = "Class = 'city'"
};
//Getting the first selected feature layer of the map view
var flyr = (FeatureLayer)MapView.Active.GetSelectedLayers().OfType<FeatureLayer>().FirstOrDefault();
RowCursor rows = flyr.Search(qf);//execute
//Looping through to count
int i = 0;
while (rows.MoveNext()) i++;
return i;
});
MessageBox.Show(String.Format("Total features that matched the search criteria: {0}", count));
##Create a raster layer
string url = @"C:\Images\Italy.tif";
RasterLayer rasterLayer = (RasterLayer)LayerFactory.CreateLayer(new Uri(url), aMap);
##Update the raster colorizer on a raster layer
// Get the colorizer from the raster layer
CIMRasterColorizer rasterColorizer = rasterLayer.GetColorizer();
// Update raster colorizer properties
rasterColorizer.Brightness = 10;
rasterColorizer.Contrast = -5;
rasterColorizer.ResamplingType = RasterResamplingType.NearestNeighbor;
// Update the raster layer with the changed colorizer
rasterLayer.SetColorizer(rasterColorizer);
##Update the RGB colorizer on a raster layer
// Get the colorizer from the raster layer
CIMRasterColorizer rColorizer = rasterLayer.GetColorizer();
// Check if the colorizer is an RGB colorizer
if (rColorizer is CIMRasterRGBColorizer)
{
CIMRasterRGBColorizer rasterRGBColorizer = (CIMRasterRGBColorizer)rColorizer;
// Update RGB colorizer properties
rasterRGBColorizer.StretchType = RasterStretchType.ESRI;
// Update the raster layer with the changed colorizer
rasterLayer.SetColorizer((CIMRasterColorizer)rasterRGBColorizer);
}
##Create a mosaic layer
string url = @"C:\Images\countries.gdb\Italy";
MosaicLayer mosaicLayer = (MosaicLayer)LayerFactory.CreateLayer(new Uri(url), aMap);
##Update the sort order (mosaic method) on a mosaic layer
// Get the Image sub-layer of the mosaic
ImageServiceLayer mosaicImageSubLayer = (ImageServiceLayer)mosaicLayer.GetImageLayer();
// Get the mosaic rule
CIMMosaicRule mosaicingRule = mosaicImageSubLayer.GetMosaicRule();
// Set the Mosaic Method to Center
mosaicingRule.MosaicMethod = RasterMosaicMethod.Center;
// Update the mosaic with the changed mosaic rule
mosaicImageSubLayer.SetMosaicRule(mosaicingRule);
##Update the resolve overlap (mosaic operator) on a mosaic layer
// Get the Image sub-layer of the mosaic
ImageServiceLayer mosaicImageSublayer = (ImageServiceLayer)mosaicLayer.GetImageLayer();
// Get the mosaic rule
CIMMosaicRule mosaicRule = mosaicImageSublayer.GetMosaicRule();
// Set the Mosaic Operator to Mean
mosaicRule.MosaicOperatorType = RasterMosaicOperatorType.Mean;
// Update the mosaic with the changed mosaic rule
mosaicImageSublayer.SetMosaicRule(mosaicRule);
##Create an image service layer
string url = @"http://imagery.arcgisonline.com/arcgis/services/LandsatGLS/GLS2010_Enhanced/ImageServer";
ImageServiceLayer isLayer = (ImageServiceLayer)LayerFactory.CreateLayer(new Uri(url), aMap);
##Update the raster colorizer on an image service layer
// Get the colorizer from the image service layer
CIMRasterColorizer rasterColorizer = isLayer.GetColorizer();
// Update the colorizer properties
rasterColorizer.Brightness = 10;
rasterColorizer.Contrast = -5;
rasterColorizer.ResamplingType = RasterResamplingType.NearestNeighbor;
// Update the image service layer with the changed colorizer
isLayer.SetColorizer(rasterColorizer);
##Update the RGB colorizer on an image service layer
// Get the colorizer from the image service layer
CIMRasterColorizer rColorizer = isLayer.GetColorizer();
// Check if the colorizer is an RGB colorizer
if (rColorizer is CIMRasterRGBColorizer)
{
CIMRasterRGBColorizer rasterRGBColorizer = (CIMRasterRGBColorizer)isLayer.GetColorizer();
// Update RGB colorizer properties
rasterRGBColorizer.StretchType = RasterStretchType.ESRI;
// Update the image service layer with the changed colorizer
isLayer.SetColorizer((CIMRasterColorizer)rasterRGBColorizer);
}
##Update the sort order (mosaic method) on an image service layer
// Get the mosaic rule of the image service
CIMMosaicRule mosaicRule = isLayer.GetMosaicRule();
// Set the Mosaic Method to Center
mosaicRule.MosaicMethod = RasterMosaicMethod.Center;
// Update the image service with the changed mosaic rule
isLayer.SetMosaicRule(mosaicRule);
##Update the resolve overlap (mosaic operator) on an image service layer
// Get the mosaic rule of the image service
CIMMosaicRule mosaicingRule = isLayer.GetMosaicRule();
// Set the Mosaic Operator to Mean
mosaicingRule.MosaicOperatorType = RasterMosaicOperatorType.Mean;
// Update the image service with the changed mosaic rule
isLayer.SetMosaicRule(mosaicingRule);
##Update a map's basemap layer
aMap.SetBasemapLayers(Basemap.Gray);
##Remove basemap layer from a map
aMap.SetBasemapLayers(Basemap.None);
##Find a layer
IReadOnlyList<Layer> layers = aMap.FindLayers("cities", true);
##Get a list of layers filtered by layer type from a map
List<FeatureLayer> featureLayerList = aMap.GetLayersAsFlattenedList().OfType<FeatureLayer>().ToList();
##Find a standalone table
IReadOnlyList<StandaloneTable> tables = aMap.FindStandaloneTables("addresses");
Home | API Reference | Requirements | Download | Samples
-
Get a style in project by name
-
Create a new style
-
Add a style to project
-
Remove a style from project
-
Add a style item to a style
-
Remove a style item from a style
-
Determine if a style can be upgraded
-
Determine if a style is read-only
-
Determine if a style is current
-
Upgrade a style
-
Construct a point symbol of a specific color and size
-
Construct a point symbol of a specific color, size and shape
-
Construct a point symbol from a marker
-
Construct a point symbol from a file on disk
-
Construct a point symbol from a in memory graphic
-
Construct a polygon symbol of specific color and fill style
-
Construct a polygon symbol of specific color, fill style and outline
-
Construct a polygon symbol without an outline
-
Construct a line symbol of specific color, size and line style
-
Construct a line symbol from a stroke
-
Construct a multilayer line symbol with circle markers on the line ends
-
Construct a multilayer line symbol with an arrow head on the end
-
Get symbol reference from a symbol
-
Modify a point symbol created from a character marker
-
Get a List of Available Fonts
-
Get/Set Default Font
-
Construct a Text Symbol With Options
-
Create a Swatch for a given symbol
-
Convert Point Symbol to SVG
-
Convert Point Symbol to PNG
-
Lookup Symbol
-
Search for a specific item in a style
-
Search for point symbols in a style
-
Search for line symbols in a style
-
Search for polygon symbols in a style
-
Search for colors in a style
-
Search for color ramps in a style
-
Search for north arrows in a style
-
Search for scale bars in a style
-
Search for label placements in a style
-
Search for legends in a style
-
Search for legend items in a style
-
Search for grids in a style
-
Search for map surrounds in a style
-
Search for table frames in a style
-
Search for table frame fields in a style
-
Set symbol for a feature layer symbolized with simple renderer
-
Apply a symbol from style to a feature layer
-
Apply a point symbol from a style to a feature layer
-
Apply a color ramp from a style to a feature layer
-
Get the active map
-
Create a new map with a default basemap layer
-
Find a map within a project and open it
-
Open a webmap
-
Get Map Panes
-
Get the Unique List of Maps From the Map Panes
-
Change the Map name
-
Renames the caption of the pane
-
Convert Map to Local Scene
-
Get Basemaps
-
Save Map as MapX
-
Save 2D Map as WebMap on Disk
-
Clip Map to the provided clip polygon
-
Clear the current map clip geometry
-
Get the map clipping geometry
-
Get the Current Map Location Unit
-
Get the Available List of Map Location Units
-
Format a Location Using the Current Map Location Unit
-
Set the Location Unit for the Current Map
-
Get the Current Map Elevation Unit
-
Get the Available List of Map Elevation Units
-
Format an Elevation Using the Current Map Elevation Unit
-
Set the Elevation Unit for the Current Map
-
Check Map Has Sync-Enabled Content
-
Generate Replicas for Sync-Enabled Content
-
Check Map Has Local Syncable Content
-
Synchronize Replicas for Syncable Content
-
Remove Replicas for Syncable Content
-
Export Map Raster Tile Cache Content
-
Export Map Vector Tile Cache Content
-
Create and add a layer to the active map
-
Create layer with create-params
-
Create FeatureLayer and add to Map using LayerCreationParams
-
Create FeatureLayer and set to not display in Map.
-
Create FeatureLayer with a Renderer
-
Create FeatureLayer with a Query Definition
-
Create multiple layers
-
Create mutliple layers with BulkLayerCreationParams
-
Add a GeoPackage to the Map
-
Create TopologyLayer with an Uri pointing to a Topology dataset
-
Create Topology Layer using Topology dataset
-
Create Catalog Layer using Uri to a Catalag Feature Class
-
Create Catalog Layer using CatalogDataset
-
Add MapNotes to the active map
-
Apply Symbology from a Layer in the TOC
-
Create a new SubTypeGroupLayer
-
Create layer from a lyrx file
-
Apply Symbology to a layer from a Layer file
-
Add a WMS service
-
Add a WFS Service
-
Adding and changing styles for WMS Service Layer
-
Create a query layer
-
Create a feature layer with class breaks renderer with defaults
-
Create a feature layer with class breaks renderer
-
Get a list of layers filtered by layer type from a map
-
Get a layer of a certain geometry type
-
Find a layer
-
Find a standalone table
-
Find a layer using partial name search
-
Change layer visibility, editability, snappability
-
Create a Lyrx file
-
Count the features selected on a layer
-
Access the display field for a layer
-
Enable labeling on a layer
-
Set Elevation Mode for a layer
-
Move a layer in the 2D group to the 3D Group in a Local Scene
-
Reset the URL of a feature service layer
-
Change the underlying data source of a feature layer - same workspace type
-
Change Geodatabase Version of layers off a specified version in a map
-
Querying a feature layer
-
Querying a feature layer with a spatial filter
-
Apply A Definition Query Filter to a Feature Layer
-
Apply A Definition Query Filter With a Filter Geometry to a Feature Layer
-
Apply A Definition Query Filter to a Feature Layer2
-
Retrieve the Definition Query Filters for a Feature Layer
-
Get Feature Outlines from a Feature Layer
-
Get the attribute rotation field of a layer
-
Find connected attribute field for rotation
-
Toggle "Scale layer symbols when reference scale is set"
-
Set the layer cache
-
Change the layer selection color
-
Removes all layers that are unchecked
-
Remove empty groups
-
Create and apply Abbreviation Dictionary in the Map Definition to a layer
-
Set zoom level for Attribute Table
-
Retrieve the values of selected cell in the attribute table
-
Move to a particular row
-
Set unique value renderer to the selected feature layer of the active map
-
Create a UniqueValueRenderer to specify symbols to values
-
Create a Heatmap Renderer
-
Create an Unclassed Renderer
-
Create a Proportion Renderer with max and min symbol size capped
-
Create a True Proportion Renderer
-
Create a scene with a ground surface layer
-
Create a New Elevation Surface
-
Set a custom elevation surface to a Z-Aware layer
-
Add an elevation source to an existing elevation surface layer
-
Get the elevation surface layers and elevation source layers from a map
-
Find an elevation surface layer
-
Remove elevation surface layers
-
Get Z values from the default ground surface
-
Get Z values from a specific surface
-
Get Z values from a layer
-
Create a raster layer
-
Update the raster colorizer on a raster layer
-
Update the RGB colorizer on a raster layer
-
Check if a certain colorizer can be applied to a raster layer
-
Create a new colorizer based on a default colorizer definition and apply it to the raster layer
-
Create a new colorizer based on a custom colorizer definition and apply it to the raster layer
-
Create a raster layer with a new colorizer definition
-
Create a mosaic layer
-
Update the raster colorizer on a mosaic layer
-
Update the RGB colorizer on a mosaic layer
-
Check if a certain colorizer can be applied to a mosaic layer
-
Create a new colorizer based on a default colorizer definition and apply it to the mosaic layer
-
Create a new colorizer based on a custom colorizer definition and apply it to the mosaic layer
-
Create a mosaic layer with a new colorizer definition
-
Update the sort order - mosaic method on a mosaic layer
-
Update the resolve overlap - mosaic operator on a mosaic layer
-
Create an image service layer
-
Update the raster colorizer on an image service layer
-
Update the RGB colorizer on an image service layer
-
Check if a certain colorizer can be applied to an image service layer
-
Create a new colorizer based on a default colorizer definition and apply it to the image service layer
-
Create a new colorizer based on a custom colorizer definition and apply it to the image service layer
-
Create an image service layer with a new colorizer definition
-
Update the sort order - mosaic method on an image service layer
-
Update the resolve overlap - mosaic operator on an image service layer
-
Create a StandaloneTable
-
Retrieve a table from its container
-
Move a Standalone table
-
Remove a Standalone table
-
Translate From Dictionary to SelectionSet
-
Translate from SelectionSet to Dictionary
-
Get OIDS from a SelectionSet for a given MapMember
-
Get OIDS from a SelectionSet for a given MapMember by Name
-
Get Elevation profile from the default ground surface
-
Get Elevation profile from a specific surface
-
Interpolate a line between two points and calculate the elevation profile
-
Show Elevation profile graph with the default ground surface
-
Show Elevation profile graph with a specific surface
-
Show Elevation profile graph between two points
-
Show Elevation profile graph using an ElevationProfileResult
-
Access the ElevationProfileGraph when added
-
Access the ElevationProfileGraph
-
Export Elevation Profile Graph
-
Customize Elevation Profile Graph Display
-
Connect to a Device Location Source
-
Get the Current Device Location Source
-
Close the Current Device Location Source
-
Get Current Device Location Source and Properties
-
Update Properties on the Current Device Location Source
-
Subscribe to DeviceLocationPropertiesUpdated event
-
Subscribe to DeviceLocationSourceChanged event
-
Enable/Disable Current Device Location Source For the Map
-
Get Current Map Device Location Options
-
Check if The Current Device Location Is Enabled On The Map
-
Set Current Map Device Location Options
-
Zoom/Pan The Map To The Most Recent Location
-
Add the Most Recent Location To A Graphics Layer
-
Set map view to always be centered on the device location
-
Subscribe to Location Snapshot event