POST
|
Hi Vinicius, I am working with arcgis 100.8 and qt 5.14.2. I am developing my application in cpp. I intend to add drag and draw feature to my application for simple shapes like a line and simple polygons like in this example: https://developers.arcgis.com/javascript/3/jssamples/graphics_add.html . I want to use purely cpp and no qml components. Can you share details regarding how you achieved the same. It would be of great help.
... View more
08-05-2021
08:08 AM
|
0
|
0
|
1102
|
POST
|
Hi @Tanner_Yould , Thanks for the quick response. The issue is resolved. I tried changing the path to C:\Users\Administrator\ArcGIS\Runtime\Data\tpkx\san_diego But getting the same output as earlier. Map doesn't load and no error msg is displayed in qt console. But I noticed that the streetmap_SD was of the extension .tpkx and not .tpk. So changed the line const QString fileLocation = folderLocation + QString("/streetmap_SD.tpk"); to this: const QString fileLocation = folderLocation + QString("/streetmap_SD.tpkx"); And now the sample loads the map correctly.
... View more
07-20-2021
07:25 AM
|
0
|
1
|
1075
|
POST
|
Hi, I am using QT 5.14.2 and Arcgis 100.8. I am trying to run the Offline Routing sample code. I downloaded the san_diego.zip folder from https://arcgisruntime.maps.arcgis.com/home/item.html?id=567e14f3420d40c5a206e5c0284cf8fc unzipped and Placed it in C:\Users\Administrator\ArcGIS\Runtime\Data\tpk\san_diego The application is built successfully. However when I run it. The map does not load and neither do I get the warning msg: qWarning() << "Please download required data."; Hence I am placing the map files at the correct location. On running the application I get output as follows: I have also tried another sample OpenMobileScenePackage wherein I placed the .mspk files in the same Runtime directory and this sample loads the map correctly. Can anyone figure out what is the issue in loading the map files from the local location in the Offline routing sample. Is there any step I am missing ??
... View more
07-19-2021
10:47 AM
|
0
|
3
|
1202
|
POST
|
Hi, I am using QT verion 5.14.2 and arcgis version 100.8. I want to create a widget application which can display routes on my 2D map. I need to add navigational features to my widget . I have gone through arcgis documentation and learnt that I might need to work on ArcGIS Pro to generate a Mobile Map Package geoprocessing tool, with the map and network dataset. My query is that is it possible to generate this data out of .shp files and use a topographic map rather than a geodatabase and network dataset?? Or is it necessary to generate a map through ArcGIS Pro??
... View more
07-19-2021
08:15 AM
|
0
|
1
|
671
|
POST
|
Hi, I am using arcgis 100.6 and qt version 5.12. I want to identify graphics on my map on mouse click and display the respective graphic attributes such as name and coordinates. In order to achieve this I want to use a responsive label i.e the label geometry should change as per zoom scale. Another issue is that whenever I click on graphics the map is zoomed in due to the mouseEvent. I am not using the arcgis callout api as I dont want to use any qml code in my application. Currently my application appears as follows: Fig 1. On click on graphics it is identified and label is displayed Fig 2. On zooming out label geometry remains unchanged 1. Is it possible to achieve such responsive labels on map (geometry changing as per zoom scale) 2. and at the same time block zoom in due to mouse events whenever graphic is clicked ?
... View more
01-03-2021
10:21 AM
|
0
|
1
|
1142
|
POST
|
I am using qt version 5.10.1 and arcgis 100.6 . My code is in cpp. I want to add zoom and pan pushbuttons on my map. I am aware that mousecontrol and keyboard controls are available for navigation on map. However I want the same functionality on my map. For eg. on clicking the <-- pushbutton my map the right pan action must be executed. Similarly on + pushbutton click map must zoom in. Is there any way to acheive this?
... View more
12-08-2020
07:25 AM
|
0
|
1
|
944
|
POST
|
I have 2 map files one is of the .mmpk format and other is .tif format. I want to add a feature layer to my map using .shp file. m_map is declared as Esri::ArcGISRuntime::Map* m_map = nullptr; and m_mapView as Esri::ArcGISRuntime::MapGraphicsView* m_mapView = nullptr; The code for feature layer is as follows: Esri::ArcGISRuntime::LayerListModel* llModel;
Esri::ArcGISRuntime::FeatureLayer* layerA;
llModel = m_map->operationalLayers();
FeatureTable* featuretable_layerA = new ShapefileFeatureTable(pathToShpFile,this);
layerA = new FeatureLayer(featuretable_layerA,this);
connect(layerA, &FeatureLayer::doneLoading,this, [this,layerA](Error loadError)
{
if(!loadError.isEmpty())
return;
m_mapView->setViewpointCenter(layerA->fullExtent().center(),80000);
qDebug("LAYERA CONNECTED");
});
SimpleLineSymbol* simpleLine = new SimpleLineSymbol(SimpleLineSymbolStyle::Solid,
QColor("red"), 3.0,layerA);
SimpleRenderer* simpleRenderer = new SimpleRenderer(simpleLine, this);
layerA->setRenderer(simpleRenderer);
llModel->append(layerA); This code works when m_map uses the .tif file as the basemap but does not work for .mmpk format. Is .shp format only applicable to .tif basemaps? Is any other format required to display feature layers in maps using mmpk file as basemap??.
... View more
10-06-2020
04:39 AM
|
0
|
1
|
662
|
POST
|
Hi, I am using arcgis 100.6 and qt 5.12.1 for application development. I want to display some text information alongside my symbol(S1) . I have tried 2 methods to do the same and facing issues in both. 1. Using TextSymbol class 2. Using labelDefinitions() function of LabelDefinitionListModel class 1. Using TextSymbol class: When using TextSymbol to display the data, I first assigned same coordinates as the symbol(S1) to the textSymbol (TS) . Both the symbols overlap as expected To avoid the overlap I set the geometry of the TextSymbol with some offset as follows: TS->setGeometry(Point(S1.y + 0.01, S1.x + 0.01, 4326)); However I am observing that the distance between both symbols changes when zoomed in or out. Below are images for S1 and TS with same offset (0.01) but different zoom in scales. The distance between S1 and TS increases as I zoom in more. Is there a way to avoid this?? =========================================================================================== 2. Using labelDefinitions() function of LabelDefinitionListModel class: The second way I used was using labelDefinitions(). Here the distance between the symbol (S1) and label (L1) remains constant on zoom in zoom out but the placement of L1 is far from the S1. I tried different labelPlacement options available in labelDefinitions() but all seem to display approximately the same distance. The labeldefinitions() uses the following json string: QString mapcode::createLabelJsonName() const
{
return QString(QStringLiteral("{\"labelExpressionInfo\":{\"expression\":\"'I - ' + $feature.NAME\"},"
"\"labelPlacement\":\"esriServerPointBelowCenter\","
"\"where\":\"NAME <> ' '\","
"\"allowOverlapOflabel\":\"avoid\","
"\"allowOverlapOfFeatureBoundary\":\"avoid\","
"\"maxScale\":\"0\",\"minScale\":\"0\","
"\"symbol\": {\"angle\":0,\"backgroundColor\":[0,0,0,0],"
"\"borderLineColor\":[0,0,0,0],"
"\"borderLineSize\":0,\"color\":[0,0,255,255],"
"\"font\": {\"decoration\":\"none\",\"size\":10,"
"\"style\":\"normal\",\"weight\":\"normal\"},"
"\"haloColor\":[255,255,0,255],\"haloSize\":1.5,"
"\"horizontalAlignment\":\"center\",\"kerning\":false,"
"\"type\":\"esriTS\",\"verticalAlignment\":\"middle\",\"xoffset\":0,\"yoffset\":0}}"));
}
I want L1 to be placed directly above or below S1. Is there a way to acheive this using labels??
... View more
09-14-2020
01:54 AM
|
0
|
1
|
812
|
POST
|
How to access older versions of documentation for example v100.4? Kindly let me know. Thank you.
... View more
03-21-2020
11:48 PM
|
0
|
1
|
661
|
POST
|
Hi James , I have kept the xml file on disk and now the example is working. However I am facing issues with some symbols. The civilian symbols are not displayed in the color code (purple) as intended. Intended symbol as per mil2525d: Symbol set - Air (code:01) Identity - Pending (code:00) SymbolEntity : Civilian - Fixed Wing (120100) The details of xml file are as follows: <message>
<_action>update</_action>
<_wkid>4326</_wkid>
<name>Coordinating Point</name>
<identity>0</identity>
<symbolset>1</symbolset>
<symbolentity>120100</symbolentity>
<_control_points>72.8562,19.0923</_control_points>
</message> However in my application the symbol is displayed with yellow color code which is default for other symbols. Is there any other information required for civilian symbols??
... View more
01-17-2020
01:01 AM
|
0
|
1
|
621
|
POST
|
Hi James, The load status of the DictionarySymbolStyle is displayed as FailedToLoad. Can you suggest what is causing the load to fail?? I have upgraded my code to arcgis 100.6. I have added the stylx and xml files as resouces to the project. Is this the correct way?
... View more
01-01-2020
02:50 AM
|
0
|
3
|
621
|
POST
|
Hi Lucas, Thanks for the response. So you mean to say that the callout example has to use the qml components and cant be written in pure cpp??
... View more
12-31-2019
08:15 PM
|
0
|
1
|
1503
|
POST
|
Hi James, Thank you for the response. 1. I have checked the coordinate system using spatialreference.wkid() using the code below. void offlinemap2d::displayLocationOnMove(QMouseEvent &mouseEvent)
{
qDebug()<<"INSIDE DISPLAY LOCATION";
// Convert clicked screen position to position on the map surface.
const Point baseSurfacePos = m_mapView->screenToLocation(mouseEvent.x(), mouseEvent.y());
const Point projectedPoint = GeometryEngine::project(baseSurfacePos, 4326);
qDebug("Projected point x cor: %lf ",projectedPoint.x());
qDebug("Projected point y cor: %lf ",projectedPoint.y());
qDebug("Basesurfacepos x cor: %lf ",baseSurfacePos.x());
qDebug("Basesurfacepos y cor: %lf ",baseSurfacePos.y());
if(baseSurfacePos.spatialReference().isProjected()==true)
{
qDebug()<<"is projected";
}
else {
{
qDebug()<<"not projected";
}
}
qDebug()<<SpatialReference().wkid();
qDebug()<<baseSurfacePos.spatialReference().wkid();
qDebug()<<SpatialReference().wgs84().wkid();
qDebug()<<projectedPoint.spatialReference().wkid();
} The console output is as follows: INSIDE DISPLAY LOCATION
Projected point x cor: 72.865688
Projected point y cor: 19.098172
Basesurfacepos x cor: 275454.851485
Basesurfacepos y cor: 2113058.817065
is projected
-1
32643
4326
4326 In the Mil2525DMessages.xml file I made the following Changes. I have also tried to run with the projected point coordinates as the control points. But no points are displayed on the map. <message>
<_type>position_report</_type>
<_action>update</_action>
<_id>43de0a7b-0096-40de-a0f5-37d7f2e19766</_id>
<_wkid>4326</_wkid>
<sic>GFGPDLF-------X</sic>
<name>Coordinating Point</name>
<identity>3</identity>
<symbolset>25</symbolset>
<symbolentity>130600</symbolentity>
<_control_points>275454.851485, 2113058.817065</_control_points>
</message> 2. I am sure that the files and path are correct. have tried displaying points using a SimpleMarkerSymbol using the following code and the points are displayed on the map successfully at the specified location. void offlinemap2d::AddPointData()
{
// create a list of points
const QList<Point> pointsList {
Point(72.852642647560347, 19.092812566811544, SpatialReference::wgs84()),
Point(72.8708416959572303, 19.08444173689877, SpatialReference::wgs84())
};
// create the symbology for the points
SimpleMarkerSymbol* sms = new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Circle,
QColor("red"), 10, this);
// create a graphic and add each of them to the overlay
foreach (const Point &buoyPoint, pointsList)
{
graphic = new Graphic(buoyPoint,sms, this);
graphicsOverlay1->graphics()->append(graphic);
}
m_mapView->graphicsOverlays()->append(graphicsOverlay1);
}
Please guide further.
... View more
12-31-2019
01:31 AM
|
0
|
5
|
1652
|
POST
|
1. How to use this example : arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/ShowCallout at master · Esri/arcgis-runtime-s… without any qml code? 2. I am trying to implement this code in pure CPP but the calloutDataChanged() signal is not generated. My guess is that this is occuring because my Component (callout) is not binded to the QProperty. What is the CPP equivalent for the following qml code in the ShowCallout.qml file??? Callout {
id: callout
calloutData: showCalloutSample.calloutData // bind to the property that is exposed
accessoryButtonHidden: true
leaderPosition: leaderPositionEnum.Automatic
} 3. Is there any reason which is causing the code to fail??
... View more
12-30-2019
02:57 AM
|
0
|
9
|
1724
|
Title | Kudos | Posted |
---|---|---|
1 | 05-27-2019 07:34 AM |
Online Status |
Offline
|
Date Last Visited |
08-06-2021
12:28 AM
|