Can the new Map Viewer support up-hill laddering for contour labels?

349
3
08-09-2021 01:51 AM
Labels (2)
David_Brooks
MVP Regular Contributor

I have a contour layer that I'm trying to get up-hill laddering (for labels) working in an online map viewer. I've tried as a feature service and a vector tile layer. But in both instances, the labels trend to orientate 'screen up' even though the laddering effect is coming through.

Can Map Viewer support up-hill labeling?


David
..Maps with no limits..
0 Kudos
3 Replies
jcarlson
MVP Notable Contributor

That kind of labeling needs to come through a map image service, which both map viewers will display appropriately. If your contours are a hosted feature layer, I'd suggest looking at hosted map image layers to accomplish this.

- Josh Carlson
Kendall County GIS
0 Kudos
David_Brooks
MVP Regular Contributor

That onyl works if you have a Portal.


David
..Maps with no limits..
0 Kudos
jcarlson
MVP Notable Contributor

Ah, I always forget that. Well in that case, you can still do it with vector tiles, but you'll need to edit the style JSON. According the the MapBox style specs , the property is text-keep-upright. Set to "false", your labels should not auto-orient to your map frame's rotation.

Download the style JSON of your vector layer. Open it in a text editor and find the section defining your contour labels, then add

"text-keep-upright": false

jcarlson_0-1628861770499.png

Lastly, if you'd rather not download, modify, and re-upload, there is a tool called the VectorTile Style Simple Editor, which you can find here. This allows you to edit the JSON in place.

- Josh Carlson
Kendall County GIS
0 Kudos