Select to view content in your preferred language

Swipe and Spotlight Widget For Flex Viewer 2.x

2139
17
02-09-2011 10:48 AM
RobertScheitlin__GISP
MVP Emeritus
All,

   I have migrated Tom Hill's Swipe and Spotlight tools to Flex 4 and Flex Viewer 2.x

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

The swipe tool behaves similarly to the swipe tool in ArcMap.

1)  The swipe tool allows you to compare two layers side-by-side, by selectively masking the top-most of the two layers.
2)  The spotlight tool allows you to see through a circular "cut out" of one map layer onto any layers below.
Tags (2)
0 Kudos
17 Replies
PedroGarcia
Deactivated User
Hi Robert,

Great widget! But unfortunately there are some bugs to fix. You can see attached screenshots with some errors (note status of buttons, tools, and active layers). Some errors are produced because of the widget doesn't sincronyse well with MapSwitcher widget. Besides, in some cases, the swipe buttom don't display the current status (because it appears deactivate and however it's activated), and sometimes the tool botom stays always activated and you can't use the pan tool. Furthermore, when the user select a layer to activate, and it's displayed a message that layer is not visible, if he selects 'Not make visible', the swipe tool should be deactivate. Finally, I consider more useful in case the layer to activate is not visible, don't display any window message, but when the user changes the active layer or closes the widget, the previous one only should be visible if it was visible before opening the widget (do you understand me? - sorry for my bad English).

Regards,
   Pedro.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Pedro,

   I don't feel like getting into managing what layers were on before the widget and resetting them to that so I just removed the question dialog altogether and now the user is responsible for ensuring the layer that they are trying to swipe or spotlight is on. See if this fixes some of your issues. Of course if you don't like the way the widget does something the source code is always there for you to change it yourself. The live preview site has been updated with the new version I have not updated the download yet though as I am still testing my changes.
0 Kudos
PedroGarcia
Deactivated User
Pedro,

   I don't feel like getting into managing what layers were on before the widget and resetting them to that so I just removed the question dialog altogether and now the user is responsible for ensuring the layer that they are trying to swipe or spotlight is on. See if this fixes some of your issues. Of course if you don't like the way the widget does something the source code is always there for you to change it yourself. The live preview site has been updated with the new version I have not updated the download yet though as I am still testing my changes.


I wish I knew Flex to create and modify widgets! (perhaps one day). Concerning resetting layers, I suggested you that because I thought if your widget was able to control if layer to activate is off, it wouldn't be difficult for you, to reset it after changing the active layer. Anyway the most important issue is your widget synchronizes fine with MapSwitcher widget. Regarding to the user is responsible for ensuring the layer is on, I prefer the widget make it visible automatically without displaying any message to user. Thanks so much for your greats widgets!
0 Kudos
PedroGarcia
Deactivated User
Pedro,

   I don't feel like getting into managing what layers were on before the widget and resetting them to that so I just removed the question dialog altogether and now the user is responsible for ensuring the layer that they are trying to swipe or spotlight is on. See if this fixes some of your issues. Of course if you don't like the way the widget does something the source code is always there for you to change it yourself. The live preview site has been updated with the new version I have not updated the download yet though as I am still testing my changes.


When do you think will be ready the new version with your changes? Please, check as well the following, in this order:

1. Select Lousville Landbase as active layer.
2. Clic Swipe tool
3. Clic Zoom in tool (below Pan tool) to zoom in an interesting area.
From this moment the Pan tool doesn't work anymore.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Pedro,

   That issue is fixed and the download has been updated.
0 Kudos
PedroGarcia
Deactivated User
Pedro,

   That issue is fixed and the download has been updated.


I've downloaded the updating, but it seems the problem I informed you in my previous post is not fixed. Even now in step 3 when you are drawing a rectangle of interested area, at the same time the image is panned. I've checked in your demo as well.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Pedro,

  I have decided to remove this widget. I have not been able to get it operation in the Viewer to work correctly.
0 Kudos
PedroGarcia
Deactivated User
Pedro,

  I have decided to remove this widget. I have not been able to get it operation in the Viewer to work correctly.


Oh, what a pity! It's a very useful widget to compare layers in a easy way. Perhaps, Esri guys should help you to make it work correctly.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   this widget is re-released with the the pan/zoom issues fixed.
0 Kudos