Select to view content in your preferred language

Confuguring Election Polling Places and Election Results Viewer

2456
3
04-19-2013 04:45 PM
Labels (1)
MattSheehan
Deactivated User
I've been walking through the set up of the election polling places and election results viewer. I have the services published in ArcGIS Online and shared properly. I have been following the set up docs. I have made edits to two files:

1) <your_directory>\ArcGIS Templates\LocalGov\ElectionPollingPlace\Application\ElectionPollingPlace\proxy.config

Here I added
              
     <serverUrl url="http://services1.arcgis.com/7QrNu8fd9YfU4kzq/arcgis/rest/services/"
                  matchAll="true"></serverUrl>

This is the ArcGIS online published service endpoint

2) <your_directory>\ArcGIS Templates\LocalGov\ElectionPollingPlace\Application\ElectionPollingPlace\js\config.js

Here I added:

    // Choose if you want to use WebMap or Map Services for operational layers
    UseWebmap: true,

    // if using WebMap, specify WebMapID within quotes, otherwise leave this empty and configure operational layers
    WebMapId: "6706a58177074f38963240d46dd01218",

I am still unable to load the data, the loading icon simply continues to spin. I am sure i have missed something simple, wondered if you might be able to give me a pointer.

Thanks

Rory
0 Kudos
3 Replies
MikeTschudi
Frequent Contributor
Hi Matt,

I get the same behavior with the 6706a58177074f38963240d46dd01218 webmap, so I tried to access it with the standard arcgis.com viewer and could not; is it public?  I also tried accessing it via the REST endpoint without success.

For exploring the service, I made a webmap using the service; I chose the Landmarks layer (http://www.arcgis.com/home/item.html?id=5987ac50eb704c09be4f113ab6a7e74a) and changed the configured DefaultExtent in config.js to "-13623749,4458171,-13541656,4536596", and the app came up with the points. Which layer did you use for the polling places in http://services1.arcgis.com/7QrNu8fd9YfU4kzq/arcgis/rest/services/, please?

Mike
0 Kudos
MaryMoneypenny
New Contributor
Matt
I had a similar problem. Did you change any of the data in your elections administation dataset? I dropped the City and State attributes so I had to alter the config.js and take that out or else the application would get stuck there as it loaded.
Mary
0 Kudos
LindsayThomas
Esri Contributor
Hello,

The bad news is you currently can't use ArcGIS Online hosted services with the currently released version of Election Results and Election Polling Place application (10.1 SP1)

Election Results and Election Polling Place application ( 10.0, 10.1 ,and 10.1 SP1 ) was designed at 10.0 with the original version of ArcGIS Online. Before ArcGIS Online had the ability to publish services.
So, the webmap is expected to contain ArcGIS for Server service types not ArcGIS Online service types. The application is not working because it is expecting dynamic map services published from ArcGIS for Server, but the services published are Feature Services.

The good news is that in the new version 10.2 version, we updated the application to work with ArcGIS Online Hosted Services. Sowe don't have any dependencies on ArcGIS for Server. 

If you would like to get an early version of the applications you can go to Github.com and download them

https://github.com/Esri/election-polling-places/tree/625ecfc8bc2eb9b10882ca5d1cfa1379f251389c
https://github.com/Esri/election-results/tree/378aea701600dbf794252e7067685b965b613180

Or you can wait until we release the new version of the applications this summer.

(Note: The maps and data structure used to author the services for the 10.2 version of the application are similar but will need some tweaking if you decided to proceed with an early version. To be more specific the joins have been removed from the data and are now handled in the application. So, you would have to remove those before using the new app with your current data\maps)

Cheers,
Lindsay
0 Kudos