Select to view content in your preferred language

Refresh MapView Programmatically

1311
8
06-28-2023 01:18 AM
Muhammad_AzhaziqBin_Mohd_Azlan
New Contributor III

Hi,

In Experience Builder is there a way to refresh the map view programmatically?

My scenario as follow:

1. User A - current open map view in Experience Builder
2. User B - Add some record on the layer connected to map view via AGOL
3. User A - Click on a custom button to refresh the map to fetch latest data

(3) scenario for table widget is supported out of the box. However, for map widget it doesn't. I did try to enable auto refresh at data source level, but the map view did not update too after the auto refresh ran.

I did try to drill down the mapView object and try to get the feature layer and execute refresh but no luck on this path too for Experience Builder.

Anyone managed to overcome this?

8 Replies
TonghuiMing
Esri Regular Contributor
0 Kudos
Muhammad_AzhaziqBin_Mohd_Azlan
New Contributor III

Not working for experience builder. It does work for vanilla js map viewer. Not quite sure why.

0 Kudos
by Anonymous User
Not applicable

@Muhammad_AzhaziqBin_Mohd_Azlan Please set the refresh interval for the data source. This maybe work.

Qun_0-1688092434995.png

 

0 Kudos
Muhammad_AzhaziqBin_Mohd_Azlan
New Contributor III

Tried also. It doesn't work. It does update the data since I can the table reloading but not the map view.

Having said that my client wants to have control to refresh the data something like refresh button we have for table widget.. 

JesseCloutier
Esri Community Manager

Noting for records: This comment from 6/29/2023 belongs to @QunSun

Jesse Cloutier
Community Manager, Engagement & Content
0 Kudos
SaurabhUpadhyaya
Occasional Contributor

@JesseCloutier @TonghuiMing Hi I am updating the map layers, now my requirement to refresh the map/view on button click. Can you please share the workaround

0 Kudos
JesseCloutier
Esri Community Manager

Hi @SaurabhUpadhyaya, I'm a Community Manager who specializes in our Esri Community platform rather than ArcGIS Experience Builder. I'll leave your question for @TonghuiMing or another member of the Community to answer. All the best!

Jesse Cloutier
Community Manager, Engagement & Content
0 Kudos
SaurabhUpadhyaya
Occasional Contributor

Thanks

0 Kudos