Map Loading Progress Bar

3875
6
09-02-2011 05:28 AM
LawrenceDhliwayo
New Contributor
Hi,

Is there a way to implement a map loading progress bar is in the Silver light API? When a user zooms the map, or loads a new layer, the progress bar shows and makes aware the user that we are waiting on some results from the server.

I would be looking for a way to have this attached to events which depend on server results such as my layer loading events and find tasks as I have lots of data being displayed.

I have tried checking in the forums with no luck. Any leads would be most appreciated.

Thanks,
Lawrence
0 Kudos
6 Replies
JeffPace
MVP Alum
Since you posted in the javascript forum, here is a js example

http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/map_showloading.html

I imagine Silverlight might have a similar one.
0 Kudos
LawrenceDhliwayo
New Contributor
Thanks Jeff,

Thats exactly what I was looking for !

Lawrence
0 Kudos
jerrysalinas
New Contributor
Hi,
I was wondering if there is another example on how to use the progress bar. I clicked the link in the thread but it has been removed. i am trying to add a progress bar when the map loads or when layers are added.

Thanks.
Jerry
0 Kudos
LawrenceDhliwayo
New Contributor
Hi,
I was wondering if there is another example on how to use the progress bar. I clicked the link in the thread but it has been removed. i am trying to add a progress bar when the map loads or when layers are added.

Thanks.
Jerry


Hi unfortunately I can't find the link either. But here is what u can do:

Have a some html mark up like so:
                <span id="status" style="position: absolute; z-index: 100; right: 350px; top: 200px;">Loading...
                </span>

And css like so:
#status
{
    background-color: black;
    color: white;
    padding: 3px;
    border: solid 3px white;
    border-radius: 5px;
}

And in your script u can call esri.show(dojo.byId("status")) at the start of you long running process and  esri.hide(dojo.byId("status")) after the end of the long running process.

Hope that helps,
Lawrence
0 Kudos
jerrysalinas
New Contributor
Thanks Lawrence for info, I was able to use it. I got it to work, just needed to also add this below.

dojo.connect(map, "onUpdateStart", function(){
          esri.show(dojo.byId("status"));
        });
        dojo.connect(map, "onUpdateEnd", function(){
          esri.hide(dojo.byId("status"));
        });


Regards.
0 Kudos
KenBuja
MVP Esteemed Contributor
0 Kudos