Fix Labeling Limitations for Vector Tiles

9939
28
08-08-2016 10:12 AM
Status: Open
ChrisBardash
New Contributor II

Currently vbnewline or other similar label formatting options (Javascript or Python) for breaking labels over multiple lines is not supported in ArcGIS Online when creating vector tiles.  This functionality is very basic cartography and has been supported for many years in the desktop world.  At the very least, these sorts of shortfalls should have validation rules that let the user know this is not an option before publishing.

28 Comments
BradJones2

..and some features in the address point layer just aren't being labeled when they all should be. Ugh...

KateLeroux1

Road label repetition and polygon placement: I recommend using Maplex and doing what you can to get positioning set up there. From my conversations with Esri, I think that when Pro generates vector tiles, it creates anchor points for your labels based on how you've configured it in Pro (Maplex or otherwise). There isn't a way to tweak how much labels repeat in the style JSON. 

It's hard to tell from your screenshots what configured styles are missing. I can try to help if you give a little more detail. 

Missing labels: try playing with the JSON properties text-ignore-placement and text-optional

Tiling scheme: this is possible! I've created vector tile layers using a custom tiling scheme. They're hard to generate, but once you have one, it works. If I remember correctly, the tool in Pro doesn't create one that works for vector tiles. I'm happy to share my tiling scheme XML if you like - send me a private message. 

Another thing to try is to separate your vector tile basemap into two layers: one for labels and one for features. Not only might that reduce or change the collision behavior, but you can then put thematic data (like a choropleth map) in between them. Esri is taking this one step further: their vector basemaps have 3 layers

BradJones2

The repeating road labels happen in both maplex and standard label engines. I'm going to go back to maplex.

I misspoke when I said configured styles.  It is still a placement issue.  Like in the first image "MAPLE ST" has two opposite orientations.  The building names (also image 1) should only display if they fit completely inside the polygon.

Did you just edit the xml file to get your tiling scheme? 

I was just thinking about breaking the baseman up like that while driving to pick up my daughter.  This basemap from Esri that I've used got me thinking about it.   

Vector tiles look so sharp and they load so quick, but this labeling issue is a pain in the booty.

KateLeroux1

Ok, now I see what you mean. For the label orientation, you could try using the text-keep-upright style property. I haven't used it myself, but it could help. 

Building labels: hopefully once you get all the Maplex settings configured, Pro will be better at not creating anchors for labels for small buildings. Check your weight rankings, too, and make sure the polygon boundary weight is high. 

I noticed another property you might want to use: text-max-angle. In the lower left of your 4th image, I see the road labels are a jumble because of the tight curve. This setting constrains the angle between each character. 

More on custom tiling schemes here: Vector Tile Custom Scheme  

KoryKramer

As noted in the Idea's original description, this is actually a known issue as the style spec does not support VBNewLine. We continue to work on label placement and formatting for vector tiles for future releases.

shan_sarkar

Quite a few fonts are not supported in Vector Tiles.

https://community.esri.com/ideas/13539 

KateLeroux

For what it's worth, when you create your own vector tiles you can embed whatever font(s) you want. The Esri vector tiles do have a limited font selection, as you said (I agree). 

ThomasColson

Not sure if this is possible with the way label placement is baked into Maplex, but an easy solution here is to simply expose the label engine to CartoCSS-style editor, which would allow complete control over the style, as well as a preview of what it's going to look like without having to generate tiles. Or, allow editing of the json within the tile package before it's uploaded. Those of us that use AGOL (Only) for tile hosting don't have the luxury of editing the json post-publication. 

KoryKramer

Thomas, I don't know (don't think) that this will help with label placement, but for your comment about not being able to edit the json post publication, I think you can.  Check out Update vector tile layer style—ArcGIS Online Help | ArcGIS and make sure to look at the helpful story maps that walk through the process.

SarahFox1

How do you access JSON?  I've used it before on feature layers, but I can't find it for the Tile Layers.