FeatureLayer from Runtime geodatabase

4536
2
Jump to solution
05-27-2015 12:03 PM
PremRadhakrishnan
New Contributor III

I have a runtime geodatabase that was generated with labels and also scale dependencies. (

I have added the Geodatabase and the FeatureLayers to the map and I can see them but I do not see the labels. The enableLabels property for the FeatureLayer looks like its readonly and setting it to true in QML does not seem to be doing anything. What do I need to do to get the labels displayed?

Second question is whether or not layer groups are supported in runtime content ?

Thanks in advance

Testing code is prettty simple

    Map {

        anchors.fill: parent

        focus : true

        ArcGISLocalTiledLayer {

            path: runtimePath + viewModel.appData.localAerials.localPath

        }

        FeatureLayer {

            id: featureLayer0

            featureTable: localReadOnlyData.geodatabaseFeatureTableByLayerId(3)

            enableLabels: true

        }

        FeatureLayer {

            id: featureLayer1

            featureTable: localReadOnlyData.geodatabaseFeatureTableByLayerId(2)

            enableLabels: true

        }

        FeatureLayer {

            id: featureLayer2

            featureTable: localReadOnlyData.geodatabaseFeatureTableByLayerId(1)

            enableLabels: true

        }

        FeatureLayer {

            id: featureLayer3

            featureTable: localReadOnlyData.geodatabaseFeatureTableByLayerId(0)

            enableLabels: true

        }

        onStatusChanged: {

            if (status == Enums.MapStatusReady)

                extent = initialExtent

        }

    }

Geodatabase {

        id: localReadOnlyData

        path: runtimePath + viewModel.appData.localGDB

        onValidChanged: {

            if (localReadOnlyData.valid)

                localGeoDatabaseLoaded(localReadOnlyData);

        }

    }

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

Prem-

Are you using 10.2.5 final? EnableLabels should work on FeatureLayer. I ran a test with a geodatabase I have, and it works just fine. This did not work in some instances for the beta. For group layers, what are you wanting to do? Is something not working? Publishing RuntimeContent is often the same as publishing a FeatureService, so any sort of analyzer errors you get when publishing a feature service should also show in publishing RTC, and things that work for a FS should work with RTC.

Thanks,

Luke

View solution in original post

0 Kudos
2 Replies
LucasDanzinger
Esri Frequent Contributor

Prem-

Are you using 10.2.5 final? EnableLabels should work on FeatureLayer. I ran a test with a geodatabase I have, and it works just fine. This did not work in some instances for the beta. For group layers, what are you wanting to do? Is something not working? Publishing RuntimeContent is often the same as publishing a FeatureService, so any sort of analyzer errors you get when publishing a feature service should also show in publishing RTC, and things that work for a FS should work with RTC.

Thanks,

Luke

0 Kudos
PremRadhakrishnan
New Contributor III

Lucas,

Thank you for your help. What we found after exploring the geodatabase with SQLLite is that once you create a label for a layer in ArcMap and readjust it, it really doesnt work and messes up the runtime content creation for whatever reason.

When we removed the layer and recreated the labeling and then created the labels again it was visible in the application.

BUT

Heres what we noticed. The labels are visible but it does not recognize a mask, in SQLLite the JSON does show the mask, we are getting rid of the mask and making the label colors better suited for visibility on mobile devices without masks.

UPDATE:

We did find that it does support label backgrounds so we are using that instead.

SQLLite viewer is a huge help for checking the layer exports now that we know what to look for.

Thanks again.

Prem