A lightweight, mobile-responsive site which gives you directions to your polling place.
- Works on smartphones, tablets, and full-sized computers
- Uses Google Maps to find your address and provide directions (walking, transit, or driving)
- Press "Use My Location" to switch to directions from where you are, not where you live
- Retrieves polling place data directly from an ArcGIS REST service
- Google Maps API (JavaScript)
- jQuery and jQuery Mobile
- HTML5 Geolocation API
- HTML5 History API
- Speech Input API
- GitHub Pages
Data service URLs and helpers are defined at the top of elect-app.js. This makes it possible for you to reuse the app with different web services. Sample:
var pollingPlace = {
// URL with {{POLLINGPLACEID}}, callback to showPoll
serviceUrl: "http://example.com/getPollingPlaces?id={{POLLINGPLACEID}}&callback=showPoll",
getFirst: function( polldata ){
return polldata.features[0];
},
getID: function( poll ){
return poll.attributes.POLLINGID;
}
};