Vector tile basemap not printing

5118
11
11-04-2019 11:58 AM
BryanBaker
Occasional Contributor

I'm unable to get vector tile basemaps to print. Even with a very simple request that only includes the vector tile data, the request succeeds, but the map is blank and the vector tile basemap does not print. The request includes a very long imageData string, which is how I take it that the vector tile printing is handled. The request is being sent from the JavaScript API version 3.29.

I've tried printing the standard Esri topo-streets and topo-vector services, as well as the Esri OSM-vector service (added as a custom basemap).

If I capture the Web Map as JSON from the browser debugger and use it directly in the print service REST (services directory) form, I get the same result. I've tried the print with print services at version 10.7.1, both a standard print service and a custom service created in ArcGIS Pro. I've also tried it in the sample print service at http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer. I understand vector tile printing was supported as of 10.6.

I've attached a Web Map as JSON string that I've tested, which includes data from the topo-vector service as generated by the JavaScript API. Any ideas or suggestions on how to debug the request are appreciated.

0 Kudos
11 Replies
MassimilianoMenestrina1
New Contributor

Hi Bryan,

Most surely you are using Win10....
Have you tried on Win7?
We had the strange behavior that it worked over Win7 but not over Win10...

Perhaps a OS level library to convert the tiles in Base64 (the very long imageData string is a BLANK image)

Hope it gets solved soon!

0 Kudos
JarrettGreen
New Contributor III

Hi Bryan,

I am using a 10.7.1 ArcGIS Server and was able to capture the web map parameter from my print request that does not have an imageData parameter. The resulting PDF does display the vector tile basemap along with the requested visible layers.

My problem is using a custom GP print service that I publish. Any time my web map JSON parameter is sent to the print service, it contains the imageData parameter and does not display the basemap. By executing the task directly from the REST service endpoint, I insert my web map JSON from the successful test above but I still don't get a basemap back. For me, it seems isolated to a print service I publish while the out of the box service works fine.

Below is a valid web map JSON I was able to POST through the service URL you provided in your original post. I get a basemap back. Did you ever get to a resolution?

{
	"mapOptions": {
		"showAttribution": true,
		"extent": {
			"xmin": -9940174.786463477,
			"ymin": 4005428.060090645,
			"xmax": -8081226.258568484,
			"ymax": 5027849.750432891,
			"spatialReference": {
				"wkid": 102100
			}
		},
		"spatialReference": {
			"wkid": 102100
		},
		"scale": 4622324.434309
	},
	"operationalLayers": [{
		"id": "World_Hillshade_3805",
		"title": "World Hillshade",
		"opacity": 1,
		"minScale": 0,
		"maxScale": 0,
		"url": "https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"
	}, {
		"id": "VectorTile_2333",
		"title": "World Topographic Map",
		"opacity": 1,
		"minScale": 0,
		"maxScale": 0,
		"type": "VectorTileLayer",
		"styleUrl": "https://cdn.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json"
	}],
	"exportOptions": {
		"outputSize": [670, 500],
		"dpi": 96
	},
	"layoutOptions": {
		"titleText": "ArcGIS Web Map",
		"authorText": "Web AppBuilder for ArcGIS",
		"copyrightText": "Esri, USGS | VITA, Esri, HERE, Garmin, FAO, NOAA, USGS, EPA, NPS | ",
		"customTextElements": [{
			"Date": "2/27/2020, 3:13:05 PM"
		}],
		"scaleBarOptions": {
			"metricUnit": "esriKilometers",
			"metricLabel": "km",
			"nonMetricUnit": "esriMiles",
			"nonMetricLabel": "mi"
		},
		"legendOptions": {
			"operationalLayers": []
		}
	}
}

Thanks,

Jarrett

0 Kudos
by Anonymous User
Not applicable

I am also seeing this. On my custom service on 10.5.1 and with a custom vector basemap where I tweaked the Navigation basemap, and print a map to PDF from Web App Builder 2.12. No basemap tiles are present. Only the vector layers come through to the Print.

0 Kudos
by Anonymous User
Not applicable

Kelly Gerrow‌ 

Using a custom print service, I have tested and confirmed, it does not load vector basemap tiles in the output. It works fine loading our own imagery tiles, and loading the classic Raster basemaps from Esri. But it does not load the vector basemaps.   The reason I need the custom print service is so I can add support for printing poster size (34x44") since the AGOL utility only goes to 11x17.  Is there an estimated timeline for a fix?

As a cross-test, I used the Esri print service (export web map task) from AGOL. It worked fine, and printed my vector basemap fine.  Update below:::  it appears to be a bug between a custom Esri print service and Chrome.

0 Kudos
by Anonymous User
Not applicable

Update::  I have done further testing.  Looks like an Esri <-> Chrome bug.

Vector basemaps work fine in Firefox on Web AppBuilder 2.5 and 2.12 on a print service on 10.5.1 Server.  But they do NOT work in Chrome on either WAB 2.5 or 2.12.  

Firefox version:   74.0 (64-bit)   (latest version as of March 18, 2020)

Chrome version:    Version 80.0.3987.132 (Official Build) (64-bit)  (latest version as of March 18, 2020)

Kelly HutchinsJianxia SongKory Kramer

Update::: an additional bug.  Even in Firefox - when I added a 34x44" size template to my custom print service, I print it in Firefox and it only prints some of the tiles. See below.  However once I opened the Advanced button in Web App Builder 2.12 and selected Preserve Extent; then... most of the tiles printed. It was still missing a sliver on each side.

So basically, custom print services don't seem to work at all with vector basemaps, presently.

I noticed another bug I will start a new thread about. The default template MXDs have a dual scale bar of miles and kilometers. I changed it Feet for the bottom scalebar in the MXD. But it displays Miles for both, on the print output in the WAB app.   Update:::: I see there is a bug with WebApp Builder.  It overrides the print templates. I set it to feet, and they are both Feet. Set it to any unit and it overrides the templates. I created a new bug thread: Bug - print templates and Web App Builder 

With Preserve extent option.....

JarrettGreen
New Contributor III

Kevin,

I did submit an Esri case regarding this issue. They tied my case to an existing bug.

BUG-000128127: Chrome does not print vector tile layers when the 'Use hardware acceleration when available' setting is not disabled.

New 

Status

Medium

Severity

1/23/2020

Submitted

Portal for ArcGIS

Product

10.7.1

Version

by Anonymous User
Not applicable

Thanks Jarrett. I hope we can patch existing Server versions at least from 10.6.1. And not require updating to 10.8/8.1.

With core AGOL leadership is tagged here, I want to note that this is another example where Web GL has issues. I think it is still premature to depend on Web GL and use featureLayers.  That is why Grouping in AGOL needs to support map image layers (dynamic map services) and load map image sublayers as true map image layers and not force feature layers or web GL.  Web GL still has the 'too many contexts' web worker bug that crashes Chrome after a few tabs with web GL are opened, as I found in 2018 and still appears present.  

KoryKramer
Esri Community Moderator

For others who are following or find this thread, the published bug is here: BUG-000128127: Chrome does not print vector tile layers when the 'U.. If this is affecting you, I encourage you to click the Subscribe button which will set you up for notifications and will also increment the count of affected customers:

Thank you!

by Anonymous User
Not applicable

both of these bugs are still present in the latest WebApp Builder - test app 

Tiles don't show up in print on a custom print service. And the scalebar units are wrong (not dual format; and don't follow the setting in Advanced of units)

0 Kudos