Web App Builder Developer Edition - How to increase GP input decimals from 3 to 6?

724
1
Jump to solution
09-17-2018 11:50 AM
IanPeebles
Occasional Contributor III

Good afternoon!  I have a geoprocessing tool that is used for mapping coordinates on the map.  In the desktop and REST environment, if I type in coordinates up to 6 decimal places (example: -97.505235. 35.641936) it will map to the degree of accuracy.  However, when publishing the tool and using in the Web App Builder develop edition, only three of the numbers following the decimal place are returned.  The number is rounded.  Is there a default setting in a configuration file that can change this?

Numbers are rounded.  I want to display up to 6 numbers following the decimal point.

When the GP tool is run at the rest endpoint:

Results of the GP tool then display showing an ArcGIS  map.

Anyone know where to change the default from 3 digits to 6 digits following the decimal point?

Thank you!

0 Kudos
1 Solution

Accepted Solutions
IanPeebles
Occasional Contributor III

Well, I figured out a solution.  Instead of having the GP parameter set as a double, I changed it to a string in the config file.  Here was the block of code that was changed:

Parameters changed from GPDouble to GPString

"dataType" was changed from GPDouble to GPString.  After doing this, here are my results:

GP Results

Coordinates now map with as many decimal places as you want.  The Web App Builder (Developer Edition) itself rounds the numbers, so when mapping coordinates with the greatest accuracy, this will reduce the accuracy.

Just wanted to pass this information along.

View solution in original post

1 Reply
IanPeebles
Occasional Contributor III

Well, I figured out a solution.  Instead of having the GP parameter set as a double, I changed it to a string in the config file.  Here was the block of code that was changed:

Parameters changed from GPDouble to GPString

"dataType" was changed from GPDouble to GPString.  After doing this, here are my results:

GP Results

Coordinates now map with as many decimal places as you want.  The Web App Builder (Developer Edition) itself rounds the numbers, so when mapping coordinates with the greatest accuracy, this will reduce the accuracy.

Just wanted to pass this information along.