Label definition on feature collection or kml layer using QML api

703
1
Jump to solution
08-06-2020 08:25 PM
by Anonymous User
Not applicable

Is there a reason feature collection and kml layers don't have label definition properties in the QML api?

Is there any way to label layers of these types?

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

For KML, the spec itself allows you to specify labels via label styles. For KML, we really try to match the spec and what is capable in Google Earth, and don't try to mix ArcGIS features with it (like LabelDefinition)

KML Reference  |  Keyhole Markup Language  |  Google Developers 

https://developers.arcgis.com/qt/latest/qml/api-reference/qml-esri-arcgisruntime-kmllabelstyle.html 

For example, you should be able to create a KmlPlacemark, set the name and set the style to a KmlLabelStyle, and view the label.

As for FeatureCollection, I'm not sure the reason why we don't have it. I think the main requirements came in for persisted feature layers and for temporary graphics, but it seems valid to have them on feature collections as well.

View solution in original post

1 Reply
LucasDanzinger
Esri Frequent Contributor

For KML, the spec itself allows you to specify labels via label styles. For KML, we really try to match the spec and what is capable in Google Earth, and don't try to mix ArcGIS features with it (like LabelDefinition)

KML Reference  |  Keyhole Markup Language  |  Google Developers 

https://developers.arcgis.com/qt/latest/qml/api-reference/qml-esri-arcgisruntime-kmllabelstyle.html 

For example, you should be able to create a KmlPlacemark, set the name and set the style to a KmlLabelStyle, and view the label.

As for FeatureCollection, I'm not sure the reason why we don't have it. I think the main requirements came in for persisted feature layers and for temporary graphics, but it seems valid to have them on feature collections as well.