How to open application on last map extent in flex

4049
10
Jump to solution
10-19-2015 03:52 AM
akshayloya
Occasional Contributor II

Hi,

When I close my flex application or re-login it, map refreshes to initial extent. I want to open my application on same extent on which I've logged-out or close the application. Any idea on how I can go about it.

Any help will be appreciated.

Regards,

Akshay

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Akshay,

   This thread is close to what you are looking for (though the code was developed for the Sample Flex Viewer the concept is similar).

Save session state

View solution in original post

0 Kudos
10 Replies
RobertScheitlin__GISP
MVP Emeritus

Akshay,

   This thread is close to what you are looking for (though the code was developed for the Sample Flex Viewer the concept is similar).

Save session state

0 Kudos
akshayloya
Occasional Contributor II

Hi Robert,

Can you please summarise for last extent thing. I'm getting bit confused with so many things in that thread.

Thanks

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Akshay,

   Most of the follow-on posts to that thread have to do with saving the TOC checked layer states and other stuff. The basic saving of the maps extent code is in the zip I provided. This will only be code you can learn from though as this code was developed for the Sample Flex Viewer (SFV). this was the viewer before esri started to even support the viewer as a product. I don't spend time in Flex any more as it is a API that has reached mature status and is no longer updated by esri.

0 Kudos
akshayloya
Occasional Contributor II

Ok. Thanks for the help.

0 Kudos
EvelynHernandez
Occasional Contributor III

Why u dont try to save the last extent in a bd field and then when the user log in u get the extent that he had?

akshayloya
Occasional Contributor II

what is bd field exactly?

0 Kudos
EvelynHernandez
Occasional Contributor III

data base field (Sorry i typed it out in spanish)

0 Kudos
akshayloya
Occasional Contributor II

oh okay. Thanks !

0 Kudos
AnthonyGiles
Frequent Contributor

Akshay,

Have a look at this widget here for ideas:

http://www.arcgis.com/home/item.html?id=73a5b7824b8542fd94c878f56861dfe0

Regards

Anthony