Parks and Rec Finder Issues

4853
15
06-07-2013 07:00 AM
Labels (1)
CraigMcDade
Occasional Contributor III
I'm trying to upgrade to the newest version of the Parks and Recreation Finder Application. There seem to be some fairly substantial changes in how the config file is to be completed vs how it was in the previous versions.

I'm not sure what I'm doing wrong, but after pointing the config data to my own services, I can't seem to be able to search for anything or populate a pop up. The loading icon just continues to restart.

I've checked the help but it is still referencing the old config.txt file not the new config.js file, so I'm not exactly sure what or where to go from here.
0 Kudos
15 Replies
MikeTschudi
Occasional Contributor
Hi Craig,

We switched from a JSON-based config.txt to a JavaScript config.js so that one could use linting tools to check the syntax of the configuration file--they're a great way to catch tiny typos that silently break a JavaScript app. (One can lint JSON, but then we'd have to remove all of the comments.)

So the first step that I do is to run my config file through a linter such as JSLint.

Thank you for pointing out the out-of-date help documentation; I added that fix to our to-do list.

Regards,
Mike
0 Kudos
CraigMcDade
Occasional Contributor III
Thanks Mike,

I ran my config through JSLINT and it is clean. My parks service is running and I have made it a feature service (another difference between the new and old versions).

The other difference I noticed is that the old version the attributes were referenced like: "FacilitySitePoint.NAME"

whereas now they are: "${NAME}"

Not sure if that is an issue that would cause my popups not to populate though.
0 Kudos
LindsayThomas
Esri Contributor
Hi Craig,

Mike and I discussed this today and I told him I would respond with more information on this.

The newest version of the Park and Recreation Finder that is available on Github.com is not officially released thus the new help and services are not available to the public yet. You are running into the issue of having the 10.1 map and data structure with the 10.2 (soon to be released application).

The easiest option to use the 10.2 application is to take your parks map for 10.1 and export the Park and Recreation Areas layer (which contains a join to the parkrecinfo table) and export into a Feature Class called Parks. (This will flatten your data out, and then you can use the application with fieldnames �??NAME�?� instead of �??FACILITYSITE.NAME�?�.)

Next, Using the same map document resource the data to use the new Parks feature class.

Next, create attachments on the feature class.

Next, add a standalone table called ParkRecComment

(I have a map package attached with the sample data and new data structure.)

Publish, the service with feature access (You will need to access to ArcSDE Geodatabase OR ArcGIS.com for Organization to get feature access. Steps for Online are below and steps for ArcGIS SDE Geodatabase are similar to the steps for ServiceRequest feature found here

This will give people the ability for people to write comments via the application on parks they are visiting.
With a Feature Service then your Park URL�??s will look like
http://yourserver/ArcGIS/rest/services/Parks/FeatureServer


Also, you should set the reference overlay to false (unless you wanted to put trails or other features on the map, in that case true is okay)
   
ReferenceOverlayLayer: {
        ServiceUrl: "http://yourserver/arcgis/rest/services/Trails/MapServer",
        DisplayOnLoad: true},



Hope this helps,
Lindsay



ArcGIS Online for organizations
To publish the Parks service using ArcGIS Online for organizations, complete the following steps:
Steps:
1. Publish Parks.mxd. In the Service Editor window, complete the following steps:
1. In the Parameters screen, choose the Best level for the Anti-Aliasing parameter.
2. In the Parameters screen, choose Force for the Text Anti-Aliasing parameter.
3. In the Capabilities screen, enable Feature Access.
4. In the Capabilities screen, disable Tiled Mapping.
2. Share the service and record the REST endpoint (full URL path).
0 Kudos
LindsayThomas
Esri Contributor
Just a note to other people that are reading this post. Craig is using a Release Candidate version of the 10.2  Park and Recreation Finder application, it is designed to use the attached schema.

I'm trying to upgrade to the newest version of the Parks and Recreation Finder Application. There seem to be some fairly substantial changes in how the config file is to be completed vs how it was in the previous versions.


Cheers,
Lindsay
0 Kudos
MattSheehan
Occasional Contributor III
We are an Esri partner talking to a number of local govt entities about this app, we are trying to put an AGOL demo together any chance we could get a version of 10.2 (i'm thinking this might fix the remaining issue we are experiencing):

http://webmapsolutions.com/LocalGovt/ParksFinder/default.htm

Thanks

--Matt
0 Kudos
LindsayThomas
Esri Contributor
Hello Matt,

The 10.2 Release Candidate Source is available via Github here  https://github.com/Esri/park-and-recreation-finder

It is considered the Release Candidate for 10.2, thus It is not currently supported by technical support. Once it is released with the ArcGIS 10.2, then it will be officially supported. The codebase is stable but could change before the official release.

Cheers,
Lindsay Thomas
0 Kudos
CraigMcDade
Occasional Contributor III
Thanks for the info Lindsay, didn't realize it wasn't fully released yet.
0 Kudos
SandiStroud
New Contributor
Hi all, I found this thread and it addresses some issues I'm having with the upgraded version of the Parks and Recreation finder.  I downloaded from git.hub the application a week ago (thus it has most of the commits especially critical ones to the config files).  Instead of using this application for parks I'm trying to use it for farms and markets that carry/grow specialty items like coffee, wine, cheese, and a list of fresh vegetables.  My database is set up similar to the parks one where it has the details of the location plus attributes for each commodity with "yes" or "no" features.

I have created the related table for comments and tested the functionality (it works) and enabled attachments to the dataset.  It is published as a feature service and I believe I've made the necessary changes to the config file to point the application at my region (Eastern Shore of Maryland), and the appropriate rest endpoints.

Before I make any cosmetic changes I wanted to make sure all functionality works with the info box when you click on a point and when you run the search.  This is where things get funky.

If I map the activities section of the config.js to the attributes which represent the services and commodities, my info box stays in a constant loop of "loading" and I am unable to do anything unless I refresh the entire application. See image:
[ATTACH=CONFIG]26726[/ATTACH]


If I leave the activities mapped to the default park attributes, and click on a point I get a error message "_48f(...) is undefined" but then it looks like this: [ATTACH=CONFIG]26727[/ATTACH]

Help!
0 Kudos
MikeTschudi
Occasional Contributor
Hi Sandi,

Have you linted the config.js file (e.g., using a tool such as JSLint)?

Can you reproduce the popup with the unending progress bar by simply clicking on any feature right after you close the splash screen? (Trying to isolate the problem: is it in the popup or is it a side effect of the activity search + select from results process?)

Because so much of the popup is constructed in the first display that you sent, I'm wondering if the comments fetch is failing.

Regards,
Mike
0 Kudos