The tile layer properly loads in Map Viewer Classic, but fails to load in the new Map Viewer. Properties of the map service layer printed from line 7 is attached.
from arcgis.gis import GIS
from arcgis.mapping import WebMap
from arcgis.mapping import MapServiceLayer
gis = GIS("home")
map_service_layer = MapServiceLayer(url='https://tiles.arcgis.com/tiles/ULBqC49IEeIR01GF/arcgis/rest/services/BH250-12_PPL/MapServer')
map_service_layer.properties
rockMap = WebMap()
rockMap.add_layer(map_service_layer)
rockMap_item_properties = {'title':'BH250-12bTest7',
'snippet':'Map displaying the XPL (Crossed Polarized Light) and PPL (Plain Polarized Light) scan images of the rock thin section for sample BH250-12b.',
'tags':['Rock', 'Thin Section']}
rockMap.save(rockMap_item_properties)
I have replicated the same issue. I have added a layer to a webmap as an Item, FeatureLayer, and a VectorTileLayer and get the same result. It opens fine in Classic Viewer but does not it New Map Viewer. Seems like a bug?
Code used below
from arcgis.gis import GIS
from arcgis.mapping import WebMap
from arcgis.mapping import VectorTileLayer
agol = GIS("home")
item = agol.content.get("967281ab07aa4dfc912abedfa5da8a53")
##lyr = item.layers[0]
##vtl = VectorTileLayer.fromitem(item)
rockMap = WebMap()
rockMap.add_layer(item)
##rockMap.add_layer(lyr)
##rockMap.add_layer(vtl)
rockMap_item_properties = {'title':'BH250-12bTest7',
'snippet':'Map displaying the XPL (Crossed Polarized Light) and PPL (Plain Polarized Light) scan images of the rock thin section for sample BH250-12b.',
'tags':['Rock', 'Thin Section']}
rockMap.save(rockMap_item_properties)
Thank you for letting me know. I've contacted Esri technical support about it. Will let you know what they say.
@fuxx0010 did you hear back from tech support? I am experiencing the same issue:
Hi,
The Esri tech support I worked with eventually logged it as a bug in late February.
BUG-000156142 Raster tile layer doesn't render in New Map Viewer, when creating a WebMap and using Add_layer from python notebook
There is a workaround for the bug in the bug page below. I hope the workaround works for you. It does not work for us/does not make sense for our workflow.
Wei-Hsin
@Wei-HsinFu , thanks very much for that info! Good to confirm that it is a bug. That workaround doesn't help me either.