What is the very last event for a Map?

1477
4
12-01-2014 07:44 AM
AdrianMarsden
Occasional Contributor III

I have some code.  It is normally is OK in Chrome

It was flaky in IE10.  The chunk that didn't work checked to see if a URL parameter was passed, if so, it set a query layer, used the passed parameter for a  query task, got the extent of the query results and set map extent to it.

I had it all in my general init  function.  Most times in IE it would fail to re-draw the map.  However a slight pan would put the map in the correct place (plus the slight pan of course)

I moved this code into the onLayersAddResult event of the map.

In IE it works a lot better,but still fails about 10% of the time.

Are any events after onLayersAddResult I can hook up to?  Or any other tricks to get my timing right?


Cheers


ACM

Tags (1)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Adrian,

   Have you tried a simple setTimeout to delay execution?

0 Kudos
KellyHutchins
Esri Frequent Contributor

Adrian,


Do you have (or can you put together) a simple test case that shows the problem?

0 Kudos
AdrianMarsden
Occasional Contributor III

Alas, along with my other timing issues I've had I've not got a public facing version - although I may have to for other reasons soon.,

0 Kudos
KellyHutchins
Esri Frequent Contributor

Alternatively you could put together a simple repo case? Sometimes that helps highlight the issue and can make it easier to troubleshoot rather than trying to find the issue in a larger app.

0 Kudos