Pass a parameter to open Election Polling Place app

3398
4
08-10-2015 12:50 PM
Labels (1)
ClaireBrill
New Contributor III

Is it possible to customize the url to open the Election Polling Place app to a specific address or with a specific address in the search box?  We are investigating linking the application from a current search results web page which shows a voters registration status and address.  A url would be constructed with the address to open the Election Polling Place application.  What code would need to be updated if this is a possibility?

0 Kudos
4 Replies
LindsayThomas
Esri Contributor

Hi Claire,

You cannot do an address but you can do an address point. For Example: you can pass the application a URL like this http://tryitlive.arcg...­

To generate a URL with a specific address point in the app:

Search for an address (you'll see the result)

Go to the share icon, Select Email

A Bitly URL is created

Click on the Bitly URL and you will see the address you searched for

-Lindsay

ClaireBrill
New Contributor III

Ok - is there a method to convert the address from the search results page into the extent/coordinate combination?

0 Kudos
ClaireBrill
New Contributor III

How is the extent determined?  How would it get calculated when starting with an address outside of the application?

0 Kudos
LindsayThomas
Esri Contributor

Hi Claire,

The four available options for generating the sharing urls are:

  • map point & feature id:  ?extent=xmin,ymin,xmax,ymax&addressPoint=x,y&featureID=id
  • map point only:  ?extent=xmin,ymin,xmax,ymax&addressPoint=x,y
  • feature id only:  ?extent=xmin,ymin,xmax,ymax&featureID=id
  • just the map:  ?extent=xmin,ymin,xmax,ymax

The app is reverse geocoding the point. If I click on the map and then share the result; the url generated would be:

http://<server>/election-polling-places/?extent=-9818737,5124874,-9807472,5129699$addressPoint=-9813...

The extent used in the URL is the current extent of the map at the time the URL is shared and generated. The extent is required to generate all of these URL’s. So, passing just the address point is not possible.

The best workaround for generating address points would be to use a zero map extent that maps the addresspoint location for example:

For http://tryitlive.arcgis.com/ElectionPollingPlace/?extent=-9813143,5126673,-9813143,5126673$addressPo...  (notice the extent and address are using the same xy’s)

I worked with our developer Mike to flush out the details. Hopefully, this can help you with your customization.

-Lindsay

0 Kudos