POST
|
Your guess is right. Null is returned for the Symbol. However, we are using mil2525d.stylx (http://arcgisfordefense.maps.arcgis.com/home/item.html?id=e34835bf5ec5430da7cf16bb8c0b075c) file and trying to fetch Symbol with keywords like 'tank' and 'friendly' as QStringList params {"tank","friendly"}; Still we are not able to successfully display symbols on map.
... View more
12-29-2019
08:57 PM
|
0
|
0
|
956
|
POST
|
Hi James, Thanks for the reply. 1) My current understanding about relationship between latitude / longitude and <_control_points>x, y</_control_points> needs to be ensured. I have currently assumed that control points 0,0 will display symbol at the centre of the map. Kindly explain how lat-long and x-y relationship is to be determined. 2) Now, I have tried changing the xml file so that the code remains unchanged. However no graphics is displayed on the map. The changes in the xml are as follows: The points are in the format <_control_points>x, y</_control_points>. I also tested the code by reversing the order. To begin with, I tried with control points as 0, 0 so that it displays symbol at the centre of map. <message>
<_type>position_report</_type>
<_action>update</_action>
<_id>43de0a7b-0096-40de-a0f5-37d7f2e19766</_id>
<_wkid>3857</_wkid>
<sic>GFGPDLF-------X</sic>
<name>Coordinating Point</name>
<identity>3</identity>
<symbolset>25</symbolset>
<symbolentity>130600</symbolentity>
<_control_points>0, 0</_control_points>
</message> This also did not help. 3) >>>To make sure there is no problem with the code itself I tried running the GODictionaryRenderer example without any changes to xml file. The application displays the map but no symbology. In this sample code I have only changed the path to the stylx and xml files only. The screenshot of the application window is attached. I have zoomed in to the exact location where the symbology is supposed to be displayed according to the github example code. So is there any additional requirement for the example to run??? The latitude longitude values to the location Devizes in the image are 51.3489° N, 1.9948° W. However in the xml files the control point values are very large in value compared to the lat-long values. So I am unable to understand how the values (control points) in the xml file are obtained. Is there any particular scale by which the lat long has to be multiplied???
... View more
12-27-2019
08:19 PM
|
0
|
7
|
1772
|
POST
|
Hi James, Accoding to your suggesstion I have tried to incorporate the sample code into my application. I want to display the following points on the map using mil2525 symbology: ( point - lat , long, spatial ref) Point 1 - 72.852642647560347, 19.092812566811544, SpatialReference::wgs84()), Point 2 - 72.8708416959572303, 19.08444173689877, SpatialReference::wgs84()), So I added these points to the point collection using addPoint() in the createGraphic function . No changes have been made to the parseXmlFile function code. Following is the code snippet. Are any more changes needed in the sample code? void offlinemap2d::addPointsFromStyleFile() { //create a new graphicsoverlay GraphicsOverlay* graphicsOverlay = new GraphicsOverlay(this); // create the symbology for the points dictionarySymbolStyle = new DictionarySymbolStyle("mil2525d",":/Res/mil2525d.stylx", this); DictionaryRenderer* renderer = new DictionaryRenderer(dictionarySymbolStyle, this); graphicsOverlay->setRenderer(renderer); //add overlay to the map parseXmlFile(); m_mapView->graphicsOverlays()->append(graphicsOverlay); } void offlinemap2d::createGraphic(QVariantMap rawAttributes) { // If _wkid was absent, use WGS 1984 (4326) by default. int wkid = rawAttributes.count(FIELD_WKID) > 0 ? rawAttributes[FIELD_WKID].toInt() : 4326; SpatialReference sr(wkid); Geometry geom; // It's a multipoint MultipointBuilder* builder = new MultipointBuilder(sr, this); PointCollection* collection = new PointCollection(sr, this); collection->addPoint(72.852642647560347, 19.092812566811544); collection->addPoint(72.8708416959572303, 19.08444173689877); builder->setPoints(collection); geom = builder->toGeometry(); if (!geom.isEmpty()) { // Get rid of _control_points and _wkid. They are not needed in the graphic's // attributes. rawAttributes.remove(FIELD_CONTROL_POINTS); rawAttributes.remove(FIELD_WKID); Graphic* graphic = new Graphic(geom, rawAttributes, this); graphicsOverlay->graphics()->append(graphic); } } Can you also explain what is meant by the control points attribute in the Mil2525DMessages.xml file. Are these control points coordinates where the symbol has to be displayed on the map??
... View more
12-26-2019
03:26 AM
|
0
|
9
|
1772
|
POST
|
Hi James, I need my application to be in native cpp . Can you provide a link or solution to read attributes and coordinates using CPP ?
... View more
12-20-2019
02:17 AM
|
0
|
11
|
1772
|
POST
|
Hi Elliot, I tried using your suggestion . The application is successfully built now and does not crash when run. However the points are not displayed on the map. The code I have used is as follows. The debug statement added is displayed in the console. void offlinemap2d::addPointsFromStyleFile() { //create a new graphicsoverlay GraphicsOverlay* graphicsOverlay = new GraphicsOverlay(this); // create a list of points const QList<Point> pointsList { Point(72.852642647560347, 19.092812566811544, SpatialReference::wgs84()), Point(72.8708416959572303, 19.08444173689877, SpatialReference::wgs84()), Point(32.6697273884990937, 56.064250073402874, SpatialReference::wgs84()), Point(32.6395150461199726, 56.06127916736989, SpatialReference::wgs84()) }; QStringList params {"tank","friendly"}; // create the symbology for the points SymbolStyle* symbolstyle1 = new SymbolStyle("/home/developer/Desktop/stylx_files/mil2525d.stylx", this); TaskWatcher tw1 = symbolstyle1->fetchSymbol(param); connect(symbolstyle1, &SymbolStyle::fetchSymbolCompleted, this, [graphicsOverlay, pointsList, this](QUuid taskId, Symbol* symbol) { qDebug()<<"inside connect"; foreach (const Point &buoyPoint, pointsList) { auto graphic = new Graphic(buoyPoint, this); graphic->setSymbol(symbol); graphicsOverlay->graphics()->append(graphic); } m_mapView->graphicsOverlays()->append(graphicsOverlay); }); }
... View more
12-20-2019
02:14 AM
|
0
|
1
|
956
|
POST
|
I am using SymbolStyle and graphicsoverlay in ArcGIS qt 100.5 to read and display symbols from a style file. The code for the function is as follows. m_mapView is my MapGraphicsView object. The application is successfully built. The application crashes when this function is called. The debug statements display true status for both tw1.isValid() and for tw1.isDone() . Can somebody guide me why this problem is occurring?? void offlinemap2d::addPointsFromStyleFile() { //create a new graphicsoverlay GraphicsOverlay* graphicsOverlay = new GraphicsOverlay(this); // create a list of points const QList<Point> pointsList { Point(72.852642647560347, 19.092812566811544, SpatialReference::wgs84()), Point(72.8708416959572303, 19.08444173689877, SpatialReference::wgs84()), Point(32.6697273884990937, 56.064250073402874, SpatialReference::wgs84()), Point(32.6395150461199726, 56.06127916736989, SpatialReference::wgs84()) }; QStringList params {"tank","friendly"}; // create the symbology for the points SymbolStyle* symbolstyle1 = new SymbolStyle("/home/developer/Desktop/stylx_files/mil2525d.stylx", this); TaskWatcher tw1 = symbolstyle1->fetchSymbol(param); qDebug()<<tw1.isValid(); while(tw1.isDone()==false) { for(int i=1;i<500;i++) { qDebug()<<i; } } qDebug()<<tw1.isDone(); symbolstyle1->fetchSymbolCompleted(tw1.taskId(),symbol1); foreach (const Point &buoyPoint, pointsList) { graphic = new Graphic(buoyPoint, this); graphic->setSymbol(symbol1); graphicsOverlay->graphics()->append(graphic); } //add overlay to the map m_mapView->graphicsOverlays()->append(graphicsOverlay); }
... View more
12-18-2019
09:10 PM
|
0
|
4
|
1084
|
POST
|
I am using dictionarySymbolStyle and dictionary renderer in ArcGIS qt 100.5 to read and display symbols from a style file. The code for the function is as follows. m_mapView is my MapGraphicsView object. The application is successfully built. The map is displayed in the output window however the points aren't displayed. The points are displayed using a simplemarkersymbol but not using the dictionary symbology. Can somebody guide me why this problem is occurring?? void offlinemap2d::addPointsFromStyleFile() { //create a new graphicsoverlay GraphicsOverlay* graphicsOverlay = new GraphicsOverlay(this); // create a list of points const QList<Point> pointsList { Point(72.852642647560347, 19.092812566811544, SpatialReference::wgs84()), Point(72.8708416959572303, 19.08444173689877, SpatialReference::wgs84()), Point(32.6697273884990937, 56.064250073402874, SpatialReference::wgs84()), Point(32.6395150461199726, 56.06127916736989, SpatialReference::wgs84()) }; // create the symbology for the points dictionarySymbolStyle = new DictionarySymbolStyle("mil2525d",":/Res/mil2525d.stylx", this); DictionaryRenderer* renderer = new DictionaryRenderer(dictionarySymbolStyle, this); graphicsOverlay->setRenderer(renderer); foreach (const Point &buoyPoint, pointsList) { graphic = new Graphic(buoyPoint, this); graphicsOverlay->graphics()->append(graphic); } //add overlay to the map m_mapView->graphicsOverlays()->append(graphicsOverlay); }
... View more
12-18-2019
08:13 PM
|
0
|
13
|
2738
|
POST
|
Thank you for the reply James. Actually printing out message() and additionalmessage() of Error object passed to doneLoadingFn helped me solve the issue. Even though file was present in the desired location, it showed that 'File not found'. Re-copying file from another PC solved the issue. Thanks for the help.
... View more
07-07-2019
10:10 PM
|
0
|
0
|
671
|
POST
|
Hello. I have been facing a strange issue. Following code renders offline map on one PC and not on other. The PCs on which code is working and renders map are: Laptops running Ubuntu 18.04.2 LTS OS on a Virtualbox VM The system on which code is not rendering map is: A 11" touch-screen tablet running Ubuntu 18.04.2 LTS OS. No VM. OfflineMap::OfflineMap(QWidget *parent) : QWidget(parent) { mgv = new Esri::ArcGISRuntime::MapGraphicsView(); mmpk = new Esri::ArcGISRuntime::MobileMapPackage("/home/Map1.mmpk", this); mgv->setWrapAroundMode(WrapAroundMode::Disabled); connect(mmpk, (&Esri::ArcGISRuntime::MobileMapPackage::doneLoading), this, (&OfflineMap::doneLoadingFn)); mmpk->load(); QVBoxLayout *vBoxLayout = new QVBoxLayout(); vBoxLayout->addWidget(mgv); setLayout(vBoxLayout); setMinimumWidth(1070); setMinimumHeight(900); viewpointfn(32.966, 75.462, 5000000/*10000000*/); show(); } I would like to know what all OS level aspects shall be checked in this case? I am using 100.4 ArcGIS runtime for Qt.
... View more
07-05-2019
01:10 AM
|
0
|
2
|
901
|
POST
|
I wanted to know location of multiple (>1k) points at an instance (during runtime) required for processing elevation of each individual point. 1.Is using asynchronous operation like locationToElevation still the most efficient way? 2.So in the case of multiple elevation queries, is it okay to obtain surface only once?
... View more
05-27-2019
09:50 PM
|
0
|
0
|
439
|
POST
|
I am using ArcGIS Runtime SDK for Qt 100.4. I am working on offline 3d application. Loaded the map (.tpk) and elevation data (.tiff). Its working with wgs84 reference. I wanted to know if there is an API or other method which returns elevation given latitude, longitude as inputs.
... View more
05-27-2019
07:34 AM
|
1
|
2
|
572
|
POST
|
Tried to create a new template app but the problem re-occurs. None of the samples compiled are able to execute.
... View more
04-22-2019
09:09 PM
|
0
|
1
|
1048
|
POST
|
Thanks Lucas. As per your suggestion we tried to build and execute the OpenMobileScenePackage from github site esri/arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_CppSamples/Scenes/ after installing Runtime 100.5. It would build correctly but wont execute. Throwing the following runtime error: QML debugging is enabled. Only use this in a safe environment. 14:56:14: The program has unexpectedly finished. 14:56:14: The process was ended forcefully. I tried to debug this and it would point me at the following line in main.cpp: QGuiApplication app(argc, argv); Can you suggest a solution?
... View more
04-22-2019
02:52 AM
|
0
|
3
|
1048
|
POST
|
So, in the meanwhile, is it possible to achieve similar offline functionality using 100.4? Also, with 100.5, how would one be able to create Mobile Scene Packages in ArcGIS Pro? Where is that feature available in ArcGIS Pro?
... View more
04-02-2019
02:55 AM
|
0
|
1
|
1048
|
POST
|
I am referring to example code given at https://developers.arcgis.com/qt/latest/cpp/guide/build-a-new-scene.htm link. Here in the code segment, two classes are called – Scene and ArcGISTiledElevationSource. My understanding is that, constructor of both these classes fetch data from internet. My requirement is to store some offline package locally and use it to render scene and apply elevation source. Can anyone let me know how can we possibly achieve the same? Related queries that I have are: 1. What is equivalent of Mobile Map Package for Scenes? Or can I use Mobile Map Package and display the same as a scene? If yes, how to achieve the same? 2. Elevation source can it be pre-applied while creating Mobile Map Package or equivalent. Thanks.
... View more
03-29-2019
02:52 AM
|
0
|
7
|
1512
|
Title | Kudos | Posted |
---|---|---|
1 | 05-27-2019 07:34 AM |
Online Status |
Offline
|
Date Last Visited |
08-06-2021
12:28 AM
|