I was happy to see the implementation of scale limits for maps within experience builder. However, I'm running into some unusual behavior with mine. My map has many cache layers in it and right now they are all cached down to the 282 scale. I've been playing around with setting the map scale limit at 282. I have the search widget in my experience and one of the layers you are able to search is parcels. I have the search tool set up with the action to select and zoom to a parcel after a successful search is done. The zoom is set to automatic zoom scale. Currently if you search for a smaller parcel it zooms down to the 282 scale, but my cache layers disappear as if it the current scale level is outside the cached scales. Even more peculiar is that if I set the map scale limits to 283 and repeat the process it then zooms down only to the 564 scale. And after this is done you are not even able to manually zoom the map in beyond 564 using either the scroll wheel or the map zoom buttons.
@MattCashen, thank you for letting us know. Could you share a sample so we can take a look, or submit a ticket to Esri Support for a reproducible case?
@Jianxia I created two duplicate versions of my experience to share. One has the scale limit set at 282 and the other has the scale limit set at 283. If you search for the address 1018 Oak Grove Ct, you should be able to see the problems I discuss above. I turned on the scale url parameter to make it easy to know the scale you're at.
Scale Limit 282 - https://experience.arcgis.com/experience/c3feeb3e10d946c6a620eedcaba6e8c5
Scale Limit 283 - https://experience.arcgis.com/experience/9fd18773908a4fe18343cbce959afda9
Thank you @MattCashen. We are investigating it.
Hi @MattCashen , thank you for reporting this issue. You mentioned two cases (scale 282 and scale 283). Let me explain them separately.
This is the basemap used by the app - https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer.
I was happy to see the implementation of scale limits for maps within experience builder. However, I'm running into some unusual behavior with mine. My map has many cache layers in it and right now they are all cached down to the 282 scale. I've been playing around with setting the map scale limit at 282. I have the search widget in my experience and one of the layers you are able to search is parcels. I have the search tool set up with the action to select and zoom to a parcel after a successful search is done. The zoom is set to automatic zoom scale. Currently if you search for a smaller parcel it zooms down to the 282 scale, but my cache layers disappear as if it the current scale level is outside the cached scales.
It is an bug for scale 282.
The final scale range is affected by the map LODs. The initial max scale is 282 (view.constraints.maxScale). The API will look for a scale in LODs that is greater than 282 and closest to 282. This scale is 282.124294, so 282.124294 is the final scale (view.constraints.effectiveMaxScale) used by the API.
When searches for parcels, the zoom-to message action calls view.goTo(extent) to change the extent of the map. However, after calling this method, the value of view.scale is 282.1242939999793, which is close to view.constraints.effectiveMaxScale (282.124294), but it is still smaller than effectiveMaxScale, which is wrong. effectiveMaxScale should be effective for all scenes to ensure that view.scale >= view.constraints.effectiveMaxScale, so this should be an API bug.
We will fix this issue in the next release.
Even more peculiar is that if I set the map scale limits to 283 and repeat the process it then zooms down only to the 564 scale. And after this is done you are not even able to manually zoom the map in beyond 564 using either the scroll wheel or the map zoom buttons.
It is the expected behavior for scale 283.
As mentioned above, the final scale range will be affected by the map LODs. The initial max scale is 283 (view.constraints.maxScale). The API will look for a scale in LODs that is greater than 283 and closest to 283. This scale is 564.248588, so 564.248588 is the final scale (view.constraints.effectiveMaxScale) used by the API.
So this is the expected behavior. I think you can set the scale to 283 as a workaround now, we will fix the issue in case1 in the next release.
Hi @MattCashen,
Currently if you search for a smaller parcel it zooms down to the 282 scale, but my cache layers disappear as if it the current scale level is outside the cached scales.
For this, after investigating, we found that it is a bug related to API. We will provide feedback on this issue to the API team for evaluation and resolution. We hope to address it in the next release, and I will keep you updated.
Even more peculiar is that if I set the map scale limits to 283 and repeat the process it then zooms down only to the 564 scale. And after this is done you are not even able to manually zoom the map in beyond 564 using either the scroll wheel or the map zoom buttons.
This is the expected behavior. Because the final scale range will be affected by the map LODs. The initial max scale is set to283. The API will look for a scale in LODs that is greater than 283 and closest to 283. This scale is 564.248588, so 564.248588 is the final scale used by the API.
Thanks,
Ke
@QunSun @Ke_Xu Thank you both for responding and explaining. I now have a better understanding of what is happening and I'm glad you will be addressing the bug. Out of curiosity, are there any plans to add in the ability to control the scales used by zoom scrolling? Right now you could potentially use zoom scrolling to get down to a certain scale that isn't the lowest scale available in the map. Then if you hit the zoom buttons within the map it will take you down to the lowest scale. Just seems like it would be a more uniform experience for the user if the map scales and the scroll zoom scales were aligned.