Select to view content in your preferred language

ArcGIS Pro vector tile package: line feature labels from multiple label classes are not distinguished correctly

292
0
Thursday
bondxiao
New Contributor

I’m creating a vector tile package (`.vtpk`) in ArcGIS Pro for a line feature layer. According to the official documentation, when a feature layer has multiple label classes, the exported vector tiles should distinguish them using fields like `_name`, `_name1`, etc.

Official documentation:
https://pro.arcgis.com/zh-cn/pro-app/latest/help/mapping/map-authoring/labeling-in-vector-tiles.htm

However, in my case, when I publish/export line feature labels to a vector tile package, all label classes are written as `_name` in the generated vector tile style JSON. I cannot use `text-field` to distinguish different label classes, because the expected `_name1`, `_name2`, etc. fields are not generated for the line features.

Example of the generated style JSON:

```json
[
{
"id": "pipelineline",
"type": "line",
"source": "esri",
"source-layer": "pipelineline",
"layout": {
"line-cap": "round",
"line-join": "round"
},
"paint": {
"line-color": "#3C8C46",
"line-width": 1.33333
}
},
{
"id": "pipelineline/label/类 2",
"type": "symbol",
"source": "esri",
"source-layer": "pipelineline/label",
"filter": [
"==",
"_label_class",
1
],
"layout": {
"symbol-placement": "line",
"symbol-spacing": 1000,
"text-font": [
"宋体 常规"
],
"text-size": 13.3333,
"text-anchor": "bottom",
"text-offset": [
0,
-0.1
],
"text-field": "{_name}",
"text-optional": true
},
"paint": {}
},
{
"id": "pipelineline/label/类 1",
"type": "symbol",
"source": "esri",
"source-layer": "pipelineline/label",
"filter": [
"==",
"_label_class",
0
],
"layout": {
"symbol-placement": "line",
"symbol-spacing": 1000,
"text-font": [
"宋体 常规"
],
"text-size": 13.3333,
"text-anchor": "bottom",
"text-offset": [
0,
-0.1
],
"text-field": "{_name}",
"text-optional": true
},
"paint": {}
}
]
```

Problem:
- The line features have multiple label classes in ArcGIS Pro.
- After exporting to a vector tile package, all labels are mapped to `_name`.
- The expected fields `_name1`, `_name2`, etc. are not generated for the line labels.
- As a result, I cannot distinguish label classes using `text-field` in the vector tile style.

Question:
- Is this a known limitation for line features in vector tile packages?
- Is there any supported way to preserve multiple label classes for line features?
- Should I split the labels into separate layers before exporting?
- Is there a workaround to make ArcGIS Pro export `_name1`, `_name2`, etc. for line labels?

Any guidance or official workaround would be appreciated.

0 Kudos
0 Replies