Select to view content in your preferred language

Error in Park Locator App

3607
4
Jump to solution
07-30-2015 03:14 PM
Labels (1)
DaniellaHerrera1
Deactivated User

Hello,

I've downloaded the Java Script App called "Park Locator" (Park Locator | ArcGIS for Local Government ) and configured it to read my web map and attributes. I've encountered this error form the start and haven't been able to figure out the issue. It seems to be hung up on drawing the route although the app hits the proxy and even uses credits, therefore I don't believe it to be a routing issue. But it doesn't seem to go farther than geocoding the address and finding the nearest park. I've disabled routing but the error is still there.

Any help or suggestions would be greatly appreciated. Here is the link to the app: http://gis.mctx.org/apps/ParkLocator/

Heres the live link that comes by default: http://tryitlive.arcgis.com/ParkLocatorLG/

Thanks in advance!!!

-Dani

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Daniella,

  The error I am seeing in the Web console is this:

TypeError: fieldValue.toFixed is not a function

Stack trace:

.numberFormatCorverter@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/infoWindowHelper.js:1168:1

.setFacility@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/carouselContainerHelper.js:464:...

._createCommonPods@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/directionWidgetHelper.js:724:13

._switchCaseForRoute@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/directionWidgetHelper.js:578:17

.queryCommentLayer@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/directionWidgetHelper.js:396:17

.executeWithoutGeolocation@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/directionWidgetHelper.js:1028:2...

._executeWhenRouteNotCalculated@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/directionWidgetHelper.js:706:17

._createDirectionWidget/<@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/directionWidgetHelper.js:208:29

.cache["dojo/_base/lang"]/</g.hitch/<@http://js.arcgis.com/3.13compact/:177:294

.cache["esri/Evented"]/</g<._onArr2Obj/<@http://js.arcgis.com/3.13compact/:800:363

l/</h@http://js.arcgis.com/3.13compact/:244:108

m<._routeTaskError@http://js.arcgis.com/3.13compact/esri/dijit/Directions.js:638:225

m<._configureRoute/<@http://js.arcgis.com/3.13compact/esri/dijit/Directions.js:620:392

.cache["dojo/_base/lang"]/</g.hitch/<@http://js.arcgis.com/3.13compact/:177:294

g<._errorHandler@http://js.arcgis.com/3.13compact/esri/tasks/Task.js:6:186

.cache["dojo/_base/lang"]/</g.hitch/<@http://js.arcgis.com/3.13compact/:177:294

.cache["esri/tasks/RouteTask"]/</g<.solve/<.error@http://js.arcgis.com/3.13compact/esri/dijit/Directions.js:330:249

So when tracking down the error in the code it seems that there is an issue with one of the fields that is expected/necessary in the web map is not a numeric field and thus can not be formatted as a number. I don't have enough information to give you any more guidance then to double check all your steps when you created your webmap. I do notice that you have your PrimaryKeyForActivity: "${OBJECTID}", and by default that field is not shown in the mxd.

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Daniella,

  The error I am seeing in the Web console is this:

TypeError: fieldValue.toFixed is not a function

Stack trace:

.numberFormatCorverter@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/infoWindowHelper.js:1168:1

.setFacility@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/carouselContainerHelper.js:464:...

._createCommonPods@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/directionWidgetHelper.js:724:13

._switchCaseForRoute@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/directionWidgetHelper.js:578:17

.queryCommentLayer@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/directionWidgetHelper.js:396:17

.executeWithoutGeolocation@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/directionWidgetHelper.js:1028:2...

._executeWhenRouteNotCalculated@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/directionWidgetHelper.js:706:17

._createDirectionWidget/<@http://gis.mctx.org/apps/ParkLocator/js/library/widgets/commonHelper/directionWidgetHelper.js:208:29

.cache["dojo/_base/lang"]/</g.hitch/<@http://js.arcgis.com/3.13compact/:177:294

.cache["esri/Evented"]/</g<._onArr2Obj/<@http://js.arcgis.com/3.13compact/:800:363

l/</h@http://js.arcgis.com/3.13compact/:244:108

m<._routeTaskError@http://js.arcgis.com/3.13compact/esri/dijit/Directions.js:638:225

m<._configureRoute/<@http://js.arcgis.com/3.13compact/esri/dijit/Directions.js:620:392

.cache["dojo/_base/lang"]/</g.hitch/<@http://js.arcgis.com/3.13compact/:177:294

g<._errorHandler@http://js.arcgis.com/3.13compact/esri/tasks/Task.js:6:186

.cache["dojo/_base/lang"]/</g.hitch/<@http://js.arcgis.com/3.13compact/:177:294

.cache["esri/tasks/RouteTask"]/</g<.solve/<.error@http://js.arcgis.com/3.13compact/esri/dijit/Directions.js:330:249

So when tracking down the error in the code it seems that there is an issue with one of the fields that is expected/necessary in the web map is not a numeric field and thus can not be formatted as a number. I don't have enough information to give you any more guidance then to double check all your steps when you created your webmap. I do notice that you have your PrimaryKeyForActivity: "${OBJECTID}", and by default that field is not shown in the mxd.

0 Kudos
DaniellaHerrera1
Deactivated User

Thank you!! I hadn't thought about that. I ended up retracing my steps again but had fields in mind now. I found my error and it works now!! (locally)

Thanks again for you time!

0 Kudos
JohnStark
Occasional Contributor

Hello Daniella,

I am experiencing the same error. The credits are being used, but the route itself is not drawing. Do you by chance remember which field was causing the error for you? I've gone back and attempted retracing my steps, but wasn't as successful as you.

Any help would be appreciated. Thanks!

0 Kudos
DaniellaHerrera1
Deactivated User

Hi Brian,

What fixed the issue was publishing the park feature with attachments. If you have any pictures along with your parks or if you're adding the comments table then the feature should be published with attachments. I realized this when I noticed it would just show the link for my picture field rather than an image. I went back and attached the image instead and that did it! If you don't have pics or don't plan to add a comments table either here's a link I got from ESRI that you drop into the \js\library\widgets\commonHelper\. It should work with or without attachments.

Best of luck!!

https://www.dropbox.com/s/fhjuo86p3shpvxs/infoWindowHelper.zip?dl=0

0 Kudos