Skip to content

CityOfBoston/elect-app

Repository files navigation

Elect-App

Overview

A lightweight, mobile-responsive site which gives you directions to your polling place.

Features

  • 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

Screenshots

Desktop

Mobile

Technologies Used

Adaptable

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;
  }
};