ArcGIS Pro is a powerful desktop application that allows you to perform many essential GIS tasks, such as designing maps and symbols. One common requirement that many organizations have is to use a standardized set of symbols in their maps, so that they have a consistent look and feel associated with their maps and their brand. The best way to handle this is to create a Style and to store all of your symbols in the Style. You can then share this Style file with anyone in your organization so they can access the same symbols. This is not a new workflow - Styles have been around in ArcMap for quite some time. But one really cool new things you can do with ArcGIS Pro is create Mobile Style Files, which are style files that can be shared with ArcGIS Runtime based applications. This means that you can create your custom symbol sets in ArcGIS Pro, and then apply those same symbols to graphics and features in ArcGIS Runtime Apps. If you have ever wanted to create and display intricate custom symbols that are beyond what the Runtime API will allow you to programmatically create, then this workflow is for you.
Step 1: Create a Mobile Style File in Pro
Step 2: Create and save a custom symbol into the Style File
Step 3: Consume in Runtime
m_graphicsOverlay = new GraphicsOverlay(this);
m_simpleRenderer = new SimpleRenderer(this);
m_graphicsOverlay->setRenderer(m_simpleRenderer);
m_symbolStyle = new SymbolStyle("/Users/<username>/Desktop/RuntimeStyles.stylx", this);
connect(m_symbolStyle, &SymbolStyle::fetchSymbolCompleted, this, [this](QUuid, Symbol* symbol)
{
m_simpleRenderer->setSymbol(symbol);
});
m_symbolStyle->fetchSymbol(QStringList{"RuntimeArrow"});
An example ArcGIS Runtime project can be found here. You will need to update the path to your style file and any keywords that you may be searching for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.