Select to view content in your preferred language

How to Open *.mxd file with Qt c++ sdk?

875
2
Jump to solution
12-19-2017 07:23 PM
hoangtruongutm
Emerging Contributor

Hi, everybody.

I have a problem about reading *.mxd file.

And more thing. When I add GraphicLayer into map. Exactly, I add it to layer(0). It was not appeared.

But if I had a map in Layer(0). And I add again, it come to layer(1), it was appeared.

Thank full.

My code:

EsriRuntimeQt::Point point1(1500000, 7500000, spatialReference);
EsriRuntimeQt::Graphic* graphic1 = new EsriRuntimeQt::Graphic(point1,txtsymbol1);
EsriRuntimeQt::GraphicsLayer* grLayer = new EsriRuntimeQt::GraphicsLayer(this);
grLayer->addGraphic(graphic1);
m_map->addLayer(grLayer);
m_map->fullExtent();
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

Regarding the MXD, ArcGIS Runtime does not open this file format. Rather, you can open the MXD in ArcMap/Pro, and create a web map, map service, mobile map package, etc, and then open that data in ArcGIS Runtime.

Regarding your graphic issue, the layers draw in the order specified, so if you are adding a new graphics layer to your map, addLayer will add your layer to n+1, where n is the length of the layer list. If you want to control z order of the layers, you could instead use insertLayer.

View solution in original post

0 Kudos
2 Replies
LucasDanzinger
Esri Frequent Contributor

Regarding the MXD, ArcGIS Runtime does not open this file format. Rather, you can open the MXD in ArcMap/Pro, and create a web map, map service, mobile map package, etc, and then open that data in ArcGIS Runtime.

Regarding your graphic issue, the layers draw in the order specified, so if you are adding a new graphics layer to your map, addLayer will add your layer to n+1, where n is the length of the layer list. If you want to control z order of the layers, you could instead use insertLayer.

0 Kudos
hoangtruongutm
Emerging Contributor

thank you verry much.

      • by hoangtruong utm ***

2018-01-23 14:35 GMT-08:00 Lucas Danzinger <geonet@esri.com>:

GeoNet <https://community.esri.com/?et=watches.email.thread>

Re: How to Open *.mxd file with Qt c++ sdk?

reply from Lucas Danzinger

<https://community.esri.com/people/LDanzinger-esristaff?et=watches.email.thread>

in ArcGIS Runtime SDK for Qt - View the full discussion

<https://community.esri.com/message/744349-re-how-to-open-mxd-file-with-qt-c-sdk?commentID=744349&et=watches.email.thread#comment-744349>

0 Kudos