Hello,
I am new in arcgis .I am trying to load shapefile with state names .I want to load state names from local file not online data .I have .shx,.shp.dbf and .geodatabase files in my system .Please give some solution
my code
void CTacticalViewClass::LoadingOfServiceFeatureFile()
{
ServiceFeatureTable* servicefeatureTable = new ServiceFeatureTable(QUrl("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/layers/2"), this);
FeatureLayer* featureLayer = new FeatureLayer(servicefeatureTable, this);
connect(featureLayer, &FeatureLayer::doneLoading, [this, featureLayer](Error e)
{
if (!e.isEmpty())
return;
m_mapShapeView->setViewpoint(Viewpoint(featureLayer->fullExtent().center(), 56759600));
});
m_Shapemap->operationalLayers()->append(featureLayer);
// Apply labels to the feature layer
const QString labelJson = createLabelJson();
LabelDefinition* labelDef = LabelDefinition::fromJson(labelJson, this);
featureLayer->labelDefinitions()->append(labelDef);
featureLayer->setLabelsEnabled(true);
m_mapShapeView->setMap(m_Shapemap);
}
ServiceFeatureTable will contain which kind of local file.
Aditya PeriAlexandra GajewskiAllen ThompsonJon FisknessGary ChryslerHuailin wang