|
POST
|
With graphics, you can either symbolize by explicitly giving the Graphic a Symbol, or you can set a Renderer on the GraphicsOverlay, and all Graphics inside of that overlay will display with the Symbol defined in the Renderer. I chose the renderer method for this example. You could store the symbol as a member variable, and then create a Graphic with that Symbol if you like: connect(m_symbolStyle, &SymbolStyle::fetchSymbolCompleted, this, [this](QUuid, Symbol* symbol)
{
m_arrowSymbol = symbol;
});
...
Graphic* graphic = new Graphic(polylineBuilder.toGeometry(), m_arrowSymbol, this);
... View more
11-10-2017
07:01 AM
|
0
|
3
|
1679
|
|
POST
|
1) I think you could do this by creating a custom symbol in Pro and saving it to a Mobile Style File. I just wrote up a blog about this process here - Using Custom Pro Symbols in ArcGIS Runtime. Please read through that and see if you can create a polygon fill symbol 2) Will the geodesic sector work? GeometryEngine Class | ArcGIS for Developers 3) Did you see the documentation we have here? GeodeticCurveType Class | ArcGIS for Developers
... View more
11-01-2017
12:30 PM
|
0
|
0
|
2001
|
|
POST
|
I just wrote up a blog about how you could author a custom symbol in Pro, and then consume this in Runtime. I think this would be the optimal way to achieve this workflow - https://community.esri.com/community/developers/native-app-developers/arcgis-runtime-sdk-for-qt/blog/2017/11/01/using-custom-pro-symbols-in-arcgis-runtime
... View more
11-01-2017
12:27 PM
|
0
|
0
|
2349
|
|
BLOG
|
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 Open Pro and create a new Project Open your Catalog Window and find the "Styles" section Right click Styles and select New > New Mobile Style. Give a name and location to create the style file. More details on the specs and limitations of a Mobile Style file can be found here. Step 2: Create and save a custom symbol into the Style File Insert a new map and add some vector data to your map Select the layer in the Contents pane, right click, and select Symbology This will open the Symbology pane and display the current symbol for the layer. You can modify this by changing color, size, and adding additional symbol layers. This allows you to make a completely customized symbol. Modify the symbol to your liking, and press Apply to see the symbol applied to the map. Once you have the desired output, click the "hamburger" icon in the top right of the Symbology pane and select Save Symbol to Style. Fill in the Name and Category and optionally give it a Key. This key will be used for fetching the Symbol in Runtime. (You could also query for all symbols and sort through the results programmatically, but retaining and fetching from a Key is the most straight forward way to get started) From the Style dropdown, select your newly created Style file. Click OK, and your symbol is now saved to your Style file and is ready for use in ArcGIS Runtime. More details about the process of creating symbol styles can be found here. Step 3: Consume in Runtime Create a GraphicsOverlay object to display Graphics in a MapView m_graphicsOverlay = new GraphicsOverlay(this); Create a SimpleRenderer and set this to the GraphicsOverlay. A SimpleRenderer will display the same symbol for every graphic in the overlay m_simpleRenderer = new SimpleRenderer(this);
m_graphicsOverlay->setRenderer(m_simpleRenderer); Create a SymbolStyle object by passing in the path to the constructor m_symbolStyle = new SymbolStyle("/Users/<username>/Desktop/RuntimeStyles.stylx", this); Connect to the SymbolStyle::fetchSignalCompleted signal. This will emit when a symbol has been asynchronously fetched from the Style. A Symbol object is passed through as a parameter, and this symbol object can then be used to set the symbol used by the SimpleRenderer connect(m_symbolStyle, &SymbolStyle::fetchSymbolCompleted, this, [this](QUuid, Symbol* symbol)
{
m_simpleRenderer->setSymbol(symbol);
}); Fetch the symbol by the unique Key defined in Pro m_symbolStyle->fetchSymbol(QStringList{"RuntimeArrow"}); Add graphics to your graphics overlay, and they will be symbolized with the custom symbol. In the below example, a simple black line with an arrow at the end of the line was created in Pro and consumed in ArcGIS Runtime. 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.
... View more
11-01-2017
12:23 PM
|
2
|
5
|
4383
|
|
POST
|
Are you using the OpenSSL libraries and including them as extra libs in your project?
... View more
11-01-2017
07:36 AM
|
0
|
2
|
1939
|
|
POST
|
You are correct that the elevation sources are for use in 3D only. I wonder if you could create a Geoprocessing Service or Package in Desktop and consume that in Runtime with a GeoprocessingTask? The Line of Sight 3D Analyst Tool sounds promising Line Of Sight—Help | ArcGIS Desktop
... View more
11-01-2017
07:34 AM
|
0
|
0
|
1219
|
|
POST
|
You will need to "accept" the mouse signals so they don't go through, and that should stop the default behavior from happening connect(m_mapView, &MapGraphicsView::mousePressed, this, [this](QMouseEvent& event)
{
event.accept();
});
... View more
11-01-2017
07:29 AM
|
1
|
1
|
1692
|
|
POST
|
Yes you should be able to use the TiledMapServiceLayer ArcGIS Runtime SDK for Qt C++ API: EsriRuntimeQt::TiledMapServiceLayer Class Reference or the TileHandler ArcGIS Runtime SDK for Qt C++ API: EsriRuntimeQt::TileHandler Class Reference
... View more
11-01-2017
07:24 AM
|
0
|
0
|
1121
|
|
POST
|
We need to update our documentation to explain this process. As for GeoprocessingRaster, I believe that this is only applicable if you have your raster on a web server and if you author your GP Service in a particular way. For the purposes of the local server analysis like what you are doing, GeoprocessingString is the way to go.
... View more
10-18-2017
08:17 AM
|
0
|
1
|
2305
|
|
POST
|
Instead of GeoprocessingRaster, please try using GeoprocessingString, where the value is the path to your raster. One additional thing to check is when you created your GPK, did you use a Python script tool or a model from ModelBuilder? If you were using a model, be sure to use Inline Variable Substitution to pass the path in. If you are using Python, use GetParameterAsText to obtain the path.
... View more
10-12-2017
07:34 AM
|
0
|
3
|
2305
|
|
POST
|
Rainer- Does the following code work for you? It updates on a timer, and uses AttributeListModel::replaceAttribute, without setting the a whole new attribute map back to the list model #include "Map.h"
#include "MapQuickView.h"
#include "Basemap.h"
#include "GraphicsOverlay.h"
#include "SimpleMarkerSymbol.h"
#include "ClassBreaksRenderer.h"
#include "Graphic.h"
#include "Point.h"
#include "RainerTest.h"
#include <cstdlib>
#include <QTimer>
using namespace Esri::ArcGISRuntime;
RainerTest::RainerTest(QQuickItem* parent /* = nullptr */):
QQuickItem(parent)
{
}
RainerTest::~ RainerTest()
{
}
void RainerTest::componentComplete()
{
QQuickItem::componentComplete();
// find QML MapView component
m_mapView = findChild<MapQuickView*>("mapView");
m_mapView->setWrapAroundMode(WrapAroundMode::Disabled);
// Create a map using the topographic BaseMap
m_map = new Map(Basemap::topographic(this), this);
GraphicsOverlay* go = new GraphicsOverlay(this);
m_mapView->graphicsOverlays()->append(go);
// Create the class breaks for the different sized cities
ClassBreak* classBreak1 = new ClassBreak("Small cities", "Cities with less than 50,000 people", 0, 2, new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Circle, QColor(Qt::gray), 30, this), this);
ClassBreak* classBreak2 = new ClassBreak("Moderate cities", "Cities with between 50,000 and 100,000 people", 2.01, 5, new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Cross, QColor(Qt::green), 30, this), this);
ClassBreak* classBreak3 = new ClassBreak("Large cities", "Cities with between 100,000 and 500,000 people", 5.01, 7, new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Triangle, QColor(Qt::blue), 30, this), this);
ClassBreak* classBreak4 = new ClassBreak("Very large cities", "Cities with more than 500,000 people", 7.01, 10, new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Square, QColor(Qt::red), 30, this), this);
// Add the class breaks to the renderer
ClassBreaksRenderer* classBreaksRenderer = new ClassBreaksRenderer("Population", QList<ClassBreak*>() << classBreak1 << classBreak2 << classBreak3 << classBreak4, this);
go->setRenderer(classBreaksRenderer);
// Create a graphic with an intial attribute value
QVariantMap attr;
attr["Population"] = 3;
Point pt(0,0);
m_graphic = new Graphic(pt, attr, this);
go->graphics()->append(m_graphic);
// Set map to map view
m_mapView->setMap(m_map);
// Timer to update graphic
QTimer *timer = new QTimer(this);
connect(timer, &QTimer::timeout, this, [this]()
{
int randVal = rand()%(10-1 + 1) + 1;
m_graphic->attributes()->replaceAttribute("Population", randVal);
});
timer->start(50);
}
... View more
10-11-2017
12:41 PM
|
0
|
0
|
2848
|
|
POST
|
Yes, you can use ArcGIS Runtime SDK for Qt to load an offline basemap. You could load a tile package (TPK), raster data (tif, dted, img, etc), or use WebTiledLayer to read tiles from the local file system. What type of data are you wanting to load?
... View more
10-11-2017
08:43 AM
|
1
|
1
|
2522
|
|
POST
|
Did you make sure to setup the mpk_blank.mpk as described here - arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_CppSamples/LocalServer/DynamicWorkspaceShapefile at v.next · Esri/arcgis-ru… Basically, download that mpk and place it at C:\users\vishnu\ArcGIS\Runtime\Data\mpk\mpk_blank.mpk As for rendering without local server, this will be possible in the next release of ArcGIS Runtime, which is due out near the end of this year.
... View more
10-11-2017
06:47 AM
|
0
|
0
|
2522
|
|
BLOG
|
Geofencing is a concept in location aware apps that is used to determine if your current location is approaching, entering, dwelling, or leaving a point of interest (POI). For example, you may want to alert drivers of upcoming road closures, home buyers of newly available houses nearby, or tourists of an attraction they are approaching. This can be done with ease using ArcGIS Runtime's GeometryEngine. The GeometryEngine provides several static functions that allow you to ask questions about the spatial relationship of 2 or more geometries. For example, some questions you can ask are "does geometry 1 intersect geometry 2", "does geometry 1 completely contain geometry 2", and "how many meters is it from geometry 1 to geometry 2". The great thing about the GeometryEngine is that this works completely client side without any network connectivity, which means there is no internet usage, and thus limited battery consumption. By using the GeometryEngine, you can perform Geofencing with the following workflow: Obtain your device's current location from the location display, and project it to the map's spatial reference connect(m_mapView->locationDisplay(), &LocationDisplay::locationChanged, this, [this](Location location)
{
Point currentLocation = GeometryEngine::project(location.position(), SpatialReference::webMercator());
... Obtain a POI polygon. This could be created programatically and displayed as a Graphic, or it could be stored in a FeatureTable and displayed as a FeatureLayer Once you have access to the Geometry object, perform the GeometryEngine function. The following code assumes you have created a polygon Graphic named m_graphic. m_within = GeometryEngine::intersects(currentLocation, m_graphic->geometry()); If the GeometryEngine function returns true, alert the user. if (m_within)
alertUser("within"); From here, you can take it further, and keep track of if the previous location was within the POI or not, which will tell you if you are entering, dwelling, or leaving the POI. You could also use the GeometryEngine::distance function to send an alert when you get near the POI. A basic sample of this workflow can be found on GitHub. Give it a try, and see if you can enhance it to fit your organization's needs and use cases.
... View more
10-10-2017
07:51 AM
|
1
|
0
|
1860
|
|
POST
|
We have a sample in our v.next branch of our sample repo - arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_CppSamples/LocalServer/DynamicWorkspaceShapefile at v.next · Esri/arcgis-ru… It is technically for 100.2, but it will work with 100.1 as well. If you clone the repo and checkout the v.next branch, the only thing you will need to change to get it to work with 100.1 is to go into the .pro file and change ARCGIS_RUNTIME_VERSION from 100.2 to 100.1.
... View more
10-10-2017
06:38 AM
|
0
|
2
|
2522
|
| Title | Kudos | Posted |
|---|---|---|
| 3 | 05-27-2026 09:52 AM | |
| 1 | 11-24-2025 10:45 AM | |
| 1 | 07-30-2025 08:26 AM | |
| 1 | 05-15-2025 07:35 AM | |
| 2 | 11-26-2024 01:27 PM |
| Online Status |
Offline
|
| Date Last Visited |
06-17-2026
07:54 AM
|