Select to view content in your preferred language

Deactivate zoom button on zoom

3126
13
Jump to solution
02-27-2013 02:52 PM
RhettZufelt
MVP Notable Contributor
Currently in the navigation tool, If I select the zoom in or zoom out buttons, it will remain active until I click on the pan button again.

Is it possible to have the zoom in/out button deactivate itself after a zoom has been performed, or have it deactivated when another widget is opened?

investigating more, I see that most widgets seem to override it somehow, but, the Elevation profile widget does not.  Is a little confusing when you zoom into an area, grab the elevation profile tool and draw you profile line.  It ALSO zooms in to the extent of the box drawn when drawing the line (I.e. both tools are active and functioning at the same time).

anyway, any idea how to disable it either when the Elevation Profile widget is active OR, after perfoming a zoom operation?

R_
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Rhett,

  Try replacing the ChartWindow I provided earlier with this older version of the ChartWindow.mxml

View solution in original post

0 Kudos
13 Replies
MattiasEkström
Frequent Contributor
Does the Elevation Profile widget use it's own drawTool? I know I had a few widgets some versions ago where each widget used it's own drawTool which caused a lot of problems when they where opened at the same time.
If the all widgets use setMapAction() (which for example draw widget and search widget do) it should also take care of not using zoom tools when drawing...
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   Here is the widget source code re-Factored to the Flex Teams standards. This will fix the issue you were seeing.
RhettZufelt
MVP Notable Contributor
Well, that fixed the zoom issue.  However, when I switch it to utilize my Elevation SOE, it gives me a blank profile.

Does this not support AGS 10.05 anymore or do I have something else going on here?

Tested in my custom state plane app as well as OTB.  The "old" version worked with either service, this one only seems to work with the ESRI SOE service.

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   Did you use the new EleveationProfileWidget.xml file? I changed all the tags in the new version to lower case to be consistent with the Flex Teams standards.
0 Kudos
RhettZufelt
MVP Notable Contributor
Yep.

Replaced the entire package and it worked fine.

changed the commenting so that it was in meters rather than feet, worked fine.

Set basechartatzero to false, worked fine.

Changed to my SOE, blank output.  Don't get any errors, just no pofile returned:


[ATTACH=CONFIG]22262[/ATTACH]

Wanted to do more testing, but can't find a ESRI 10.0 SOE to test against and it doesn't appear as if the version for 10.1 is available to install on my 10.1 test box.

R_
0 Kudos
RhettZufelt
MVP Notable Contributor
Definatly seems to be a server version issue.  If I try the sampleserver4 SOE (v 10.02 )that came with the original widget, it produces blank output as well.

Also, if I try to use the 10.1 (sampleserver6) version in the original widget, I get this error: 
A problem occurred while parsing and charting the returned elevation data:
Error #1010: A term is undefined and has no properties.



R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   Can you use your Service and put a trace statement in the soeResult function and send me the trace text:

trace(event.result.toString());
0 Kudos
RhettZufelt
MVP Notable Contributor
Here you go.  I attached as text files. 

trace_v10_0.txt is using the 10.0 SOE and does not work with new Profile Widget (works with old)
trace_v10_1.txt is using the 10.1 SOE and does not work with the old Profile Widget.(works with new)

I see that not only does the new one provide additional info (SR, hasZ) , but they have changed the pairing of the data.  The "new" one it seems it gives an [x,y,z],[x,y,z],  whereas the old one gives [x,y],[x,y],, format.

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

  Try replacing the ChartWindow I provided earlier with this older version of the ChartWindow.mxml
0 Kudos