kins_z


Is there anyway to programaticaly know if the map has completely finshed loading I would like to know if this event can be cought not only when the map is being initiated but even when zooming in/out, changing the map type or panning the map.

Thanks





Re: map loaded event

Derek Chan


No because VE is asynchronous so theres no way to know when the call will be finished. That being said, there are ways to get around this but you need to specific of what exactly you want to do as there are millions of scenarios out there





Re: map loaded event

kins_z

Derek..

I am trying to show a "loading " icon or text while the map is still loading layers. I need to implement this functionality because some of the custom layers might be carrying no data...and the user must be notified when the map is actually not loading anymore....in its absence the user might think that my application has broken...

I would not mind switching the loading on/off every time a tile is being loaded..it would be nice to know which layer that tile belongs to, but that is not something that I really need.. its more for the cosmetics of the application.

I would like to implement this using two functions like " ontileRequest" and "ontileLoaded " that would show or hide the "loading " icon or text.

There is a variable "readystateValue" on the veapi that I have found.. but using it would require polling, and that will slow down the app tremendously.



Thank you.










Re: map loaded event

Derek Chan

Sorry, these functions don't exist.

Now if your really ambitious you could hack the VE ashx file and change the way page loading works. That is, if you can "unobfusciate" the code.

From what I know, your pretty much stuck with the OnPageLoad event, unless someone else has any other ideas






Re: map loaded event

SoulSolutions

There is no way I know of.

I would search the web to see how you can detect if an image has loaded in gerneral on the web, you could work out what image should be loaded for the current mapview in javascript, its a lot of overhead though. Maybe there is a way to verify it

John.






Re: map loaded event

Mukund R

Probably this is not what you are looking for but it might help

http://viavirtualearth.com/Wiki/Preloader.ashx