Changing the format of measure result of fusion viewer

By Daniel Du

If you are using measure widget of Fusion viewer, you will notice that the measure result if in exponential format, like 4.91e+5m. Is it possible to the change the format?

Measure widget of fusion viewer uses following JavaScript code snippet to handle the output result:

C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2012\www\fusion\widgets\Measure.js , around line 583:

value = value.toPrecision(this.areaPrecision);

You can change this code to show the result as your preferred format. To make your changes take effect, you need to change the template file, for example, it is C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2012\www\fusion\templates\mapguide\slate\index.html for Slate template:

Change from:

http://../../../lib/fusionSF-compressed.js

To:

http://../../../lib/fusion.js

You may also want to check out this blog – Debugging Fusion Viewer or Mobile Viewer of AIMS in Firebug


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading