Select to view content in your preferred language

How to Limit Flexviewer to Pan only within a fixed Map Extent?

973
7
12-14-2010 10:50 AM
NadeemShaukat
Deactivated User
I am trying to limit Flexviewer to pan only within a specified  map extent. Does anyone know where to add this functionality in one of the widget's mxml or a config file?

Nadeem
Tags (2)
0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus
Nadeem,

    There is no simple change to come config file or xml to do this it involves extending the map component and reworking a large part of the MapManager.mxml. Here is the code to do it in SFV 1.x

http://forums.esri.com/Thread.asp?c=158&f=2421&t=295234&mc=0#msgid921194

I have not done this for FlexViewer 2.x and do not have plans or time to do so right now.
0 Kudos
NadeemShaukat
Deactivated User
Thanks Robert. I will see how easy it's to implement your code in 2.x.

Nadeem
0 Kudos
MarkSmith1
Deactivated User
Is there anything new in the 2.3.x version of the viewer that makes this any easier to implement?
0 Kudos
NasifAlshaier
Deactivated User
Thanks Robert. I will see how easy it's to implement your code in 2.x.

Nadeem


Hi Nadeem..
were you able to do this in the 2.x viewer? I tried to use the code provided by Robert and I was not Successful...

p.s. I am using 2.4

Thanks
Nasif
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nasif,

   I have not tested for 2.4 but this link has a download that I did test in 2.3.1

http://forums.arcgis.com/threads/20799-Restrict-View-Port-Bounds-in-Flex-Viewer-2.x
0 Kudos
omega_cancer
Frequent Contributor
0 Kudos
NasifAlshaier
Deactivated User
Nasif,

   I have not tested for 2.4 but this link has a download that I did test in 2.3.1

http://forums.arcgis.com/threads/20799-Restrict-View-Port-Bounds-in-Flex-Viewer-2.x


Hi Robert..

as always thanks for your help... I followed the instruction you have and I did not any error when I compiled.. The only issue is when I ran it, the map keeps moving up and down... I know the problem is with the extent...  here what I have in my config. xml:

   <map      initialextent="-8986000 2944500 -8850000 2974700"
             fullextent="-8986000 2946500 -8850000 2974700"
        top="40" >
what do you thinh I should put in the MapManagerSkin.. ?

Nasif
0 Kudos