Refresh arcgis.com map periodically or via interface

650
1
03-08-2012 03:29 PM
ZorbaConlen
Occasional Contributor
Does anyone know if it's possible to refresh an arcgis.com map display programmatically?

Scenario 1.) arcgis.com map embedded on my website. I have a button on the page (next to map) which when clicked, makes some restful request (maybe deletes or adds a feature to my feature service). I would also like to force the map to refresh at that time to that it shows the update to the service. Zoom extent, layer visibility, etc... must not change though...

Scenario 2.) Similar to above, but want the map to refresh periodically with no need for user to interact with interface. Perhaps the map is reading a map service which is being updated constantly, like with AVL type data.

Best if the refresh is subtle. So, the basemap should not refresh, just the effected service, if possible.

Looking for some hints or tips from anyone who has attempted this.

Thanks.
Tags (2)
0 Kudos
1 Reply
MikeMinami
Esri Notable Contributor
Yes, with a little programming, you could build your own application by using the JavaScript API. You could put a map control on the page, point it at an ArcGIS.com web map and write the code you need to do your task. Here's a link to the API documentation.

http://help.arcgis.com/en/webapi/javascript/arcgis/

Check out the JavaScript API forum for questions on building apps.

http://forums.arcgis.com/forums/15-ArcGIS-API-for-JavaScript

Thanks,

Mike
0 Kudos