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?
Solved! Go to Solution.
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.
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.