Whenever I try to add a vector tile layer to a webmap in ArcGIS Online, it fails with the following message: "The layer, VectorTileLayer, cannot be added to the map." This is the case if I add my own vector tile layers, or if I try to add a vector basemap from the vector basemap group. Is there something I have to do to use these layers in my ArcGIS Online maps?
The docs provide some information... did you see the help topics...?
I have read the help thoroughly. When I could not add vector basemaps from the vector basemaps group, I thought I was doing something wrong. But now I have started working with my own vector tiles, and I am pretty sure that it should be working. I'll keep looking into it.
Hi Andy,
Adding these layers should work by adding them to the map the same way you add other layers. Try monitoring your requests using a web debugging tool like developer tools or fiddler in order to see if there are any requests that are failing. Another option is to contact Technical support to specifically look into the issue.
-Kelly
It turns out that while I cannot work with vector tiles in Chrome, they work perfectly in Edge.
HI Andy,
Check to see if you are running into mixed content issues, (using a mix of http and https). Sometimes microsoft browsers are configured to allow mixed content whereas chrome by default blocks the content. To determine this, check the following:
1. When opening the map viewer, ensure that it is loading via https. If you see http in the url, modify the url and reload the map. Then try to add the vector tile layer.
2. When opening in chrome, press f12 to bring up developer tools. Click on the console tab and see if there are any errors. If there are, check to see if the errors indicate that there are mixed content issues.
3. Check for errors (red x's) in the right hand corner of the URL loader to see if you are receiving an error message about secure content not loading.
You should be able to load vector tiles in chrome, so let us know if fixing a mixed content issue resolves the issue.
Kelly
I am afraid I can't tell if it is loading via https or not. It's just "
orgname.maps.arcgis.com". Putting "https" in front of it doesn't seem to
make any difference.
I don't get any console errors when I simply try to add a vector tile layer
to a new map. Just the "cannot add to map" dialog box. However, I am
getting mixed content errors on a story map I recently did, and am having
some issues with that as well. Some of those errors are about secure
content not loading, even though they are https.
Andy K. Wells
GIS Coordinator
Southside Planning District Commission
200 S. Mecklenburg Ave.
South Hill, VA 23970
(434)447-7101
Andy, are you using a custom tiling scheme or coordinate system? I have had this issue when I tried to add a vector tile layer to a map containing layers (such as the basemap) in another tiling scheme.
It's not a custom scheme or anything fancy. Just the regular Google/ArcGIS Online scheme.
Now it appears it works in Chrome on my other machines, so it must be something on my end.
I have had the chance to check it on other machines with Chrome and they seem to work ok, so it must be something about my personal workstation. I'll keep messing around with it.