Buffer Tool in HTML5 - user-defined distance
Working in GE 4.3 and HTML5 viewer 2.4 -
Used an older code-gallery buffer parcels workflow, works well as far as it goes. I would really like to have a simple pop-up when the tool is run that allows the user to enter the desired buffer distance, not just a hard-coded value.
Having all kinds of trouble using a combo box in Workflow Designer, as far as data-type for the bufferdistance variable I create (not happy with string-to-Int conversions). I feel like this is a simple task, and I'm just fairly new to Workflow Designer. I can get a pop-up to show up and you can enter a value, but the tool doesn't seem to respect the value entered at all.
Any one have a similar tool, or helpful hints on how to get this done?
Thanks -
Allen
-
Found a solution to my own problem -
The issue is that Workflow often gives you a an error when you have a string variable that gets treated as a number somewhere, and visa versa. In this particular case the BufferTask requires the distance paramter to be 'double' data type.
If you create a variable that is the result of a user-entered value for your buffer distance, you must create it as a string, then convert it to double in the BufferTask distance input.
So if you call your variable 'buffdist' that is the user-entered buffer distance captured through a form/combobox or textbox, in the buffertask you can use that variable in the 'distance' parameter IF you write as so: CDbl(bufferdist)
I'm assuming the CDbl means 'convert to double' - not sure if the equivalent works for Int32 (CInt or similar).
Probably something many knew already but it is very helpful as Workflow is picky about string-to-number conversions.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar