Is there any way to control what scale levels the scroll zooming uses? Using the url parameters I've noticed that the scroll zooming function zooms at scale levels that don't correspond to the AGO tiling scheme. This is problematic for me as the map I'm using has a lot of tiled layers that I have created using the AGO tiling scheme. So now when you use the scroll zooming some of the labeling on these layers appears blurry because they weren't cached for the scale levels being used by the scroll zooming. If I use the built in zoom tool that comes with the map widget this zooms at the AGO tile levels. But turning off scroll zooming isn't really an option as the vast majority of people who open an online map will be expecting the ability to use their mouse to zoom.
This seems like an Experience Builder bug to me. Mouse scroll zoom worked correctly in ExB Dev 1.11, but after upgrading to 1.14 the mouse scroll does not match AGO tiling scheme scales as you mentioned. Similarly, the built-in Experience Builder in ArcGIS Enterprise 11.3 has the same issue. This causes display issues with cached map services, as you also mentioned.
I've been working with support to confirm if this is a bug and will update once I have more information.
Your post helped me figure out that the Map Widget zoom tool (+ / - buttons) steps through the AGO tiling scheme scales correctly despite the mouse scroll zoom not working, so thank you!
Glad I was able to help in some small way. I did find a workaround for controlling how far in and out the user can zoom. If you create your own basemap with your own tiling scheme and use that as the basemap for the map being used in EB it will not zoom in or out beyond the tiling scheme levels you set. This still doesn't do anything in regards to the mouse zoom scrolling but now at least my users can't go in past the cache levels I have set.
Update:
Support indicated this is actually "as designed". Seems odd to design a feature that will significantly degrade display of cached map services, but here we are. It is now an enhancement request, but considering the implications it is still likely to be resolved in the versions I mention below.
Workaround:
The real point of the update. If you are using ExB Developer, some minor changes to the mapbase.tsx of a customized map widget can resolve the issue. Change snapToZoom property to true in a couple places.
lines 948 to 953
if (zoomMaybeFloat) {
// Note, we must set snapToZoom to false if we can get hashViewpoint, otherwise the final view.scale is different with hashViewpoint.scale,
// because hashViewpoint.scale comes from a float-zoom map and view.scale comes from a int-zoom map.
mapViewOption.constraints.snapToZoom = true // CUSTOMIZED
}
}
lines 1206 to 1216
if (this.isMapView(view)) {
// snapToZoom: true means integer zoom, false means float zoom
// We need to set the initial value to true for backward compatibility and keep the same behavior with MapViewer
// After map inited, we will set snapToZoom to false to get the best synchronization between two map widgets
// We use setTimeout here to make sure the above this.goHome(false) is done.
setTimeout(() => {
(view as __esri.MapView).constraints.snapToZoom = true // CUSTOMIZED
}, 0)
}
})
Original Post:
Support confirmed this is a bug and is now under review. I assume we won't see a fix until at least ExB Developer Edition 1.16, or ArcGIS Enterprise 11.4 which is likely months away, but maybe ESRI will surprise us!
Update: Link to bug report