Select to view content in your preferred language

Revisit Map page using JQuery Mobile

732
0
05-23-2012 09:44 AM
by Anonymous User
Not applicable
Original User: fergie319

I'm developing a mobile application with the ArcGIS compact javascript framework and jquery mobile that has a home page that links to a map.  I've found that when you click on the link to the map it performs the nice jquery slide transition to the map and loads it properly.  However, if you then click on the browser back button or click another link to the home page, then click on the map link again, then the map doesn't load properly.  The dojo init event is still raised and all the initialization code is still running, but onload never fires on the map.  I tried destroying the map in case something was sticking around between page transitions, but that just broke the whole thing.

I was able to fix half the problem by setting data-ajax="false" on the link back to the home page, but this doesn't solve the problem when the user manually clicks the back button.  Also, it gets rid of the nice transition and so isn't as smooth a user experience.

Is there a way to ensure that the map re-loads properly when making a jquery page transition?

Thanks,
Matt
0 Kudos
0 Replies