Select to view content in your preferred language

turn off/on photos and comments options in Parks and Rec Finder

523
1
10-07-2013 06:55 PM
by Anonymous User
Not applicable
I was curious if you can turn off/on the photos and comments options with Parks and Recreation Finder, or at the least have them set up to be reviewed before posting online. I showed the app to my supervisors who liked it but they were concerned about possible lewd photos or comments being sent in and posted online. I would like to assure them that their concerns are not warranted.
0 Kudos
1 Reply
LindsayThomas
Esri Contributor
Hello Tom,

You can turn off comments by setting visibility to false (see snippet below).

    CommentsLayer: {
        //Set to true if comments need to be displayed , or false if not required
        Visibility: false,
        //URL used for doing query task on the comments layer
        URL: "http://services.arcgis.com/b6gLrKHqgkQb393u/arcgis/rest/services/ParksTryItLive/FeatureServer/1"
    },


As for the photos they are "attachments"  added to individual the parks features on the data side. The Parks Finder application doesn't have anyway for the public to add photos.

However, if you have a "feature access" enabled on your service there is a possibility of someone problematically adding unwanted photos via the REST services .

We don't have the ability to turn this off in the configuration file. The app must have attachments enabled on the parks feature class to work.... BUT...because you are disabling comments you don't need "feature access" available for the parks service anymore.

So, the workaround for if you are using:
-ArcGIS Online Hosted Services is to publish the feature service but disable editing.
-ArcGIS for Server Server services is to publish the parks.mxd as a map service (without feature access) and use those services in the app.
Instead of a URL like
http://yourserver/arcgis/rest/services/Parks/FeatureServer/0

you would use a URL like
http://yourserver/arcgis/rest/services/Parks/MapServer/0

in the section of the config.js below
  
//URL used for doing query task on the feature layer
    FacilityLayer: "http://yourserver/arcgis/rest/services/Parks/MapServer/0",
    //Set the primary key attribute for features
    PrimaryKeyForFeatures: "${FACILITYID}",



This should configure that application the way you like. And you will still have the ability to add City\County sanctioned park photos in your gallery without giving the public access.

-Lindsay
0 Kudos