Hillary Map
This project displays Hillary events on a Google Map, using the Google Maps JavaScript API and the Google Maps Geocoding API.
Demo
http://devprogress.us/events_map/
Configuration
You can configure the settings using the config
object in the index.html file. Below are the possible settings:
-
api_key
: String. Set this to your API key for the Google Maps and Google Maps Geocoding APIs -
categorize_by_event_type
: Boolean; defaults totrue
. Set this totrue
if you want events to be separated into layers by event type (i.e. phone bank, party, voter registration, etc.). -
all_events_icon
: String. Set this to the URL of the pin icon to use for events ifcategorize_by_event_type
is set tofalse
. -
search_descriptions
: Boolean; defaults totrue
. Set this totrue
if you want the events to be classified into types based on the keywords that appear in the event descriptions, not just the keywords in the event titles. (Note that event descriptions will only be used to classify event type in the scenario in which no part of the event title matches any of the event type keywords.) -
default_to_user_location
: Boolean; defaults tofalse
. Set this totrue
if you want the map to automatically try to find events near the user's location, unless the user has specifically searched for a location. -
map_center
: Object, default to:'map_center': { 'latlng': [41.238911,-96.0174055], 'zip': '68106' }
This is an object containing two keys. The first key is
latlng
and the second iszip
. Together these two keys specify the default center of the map. -
date_filter
: Object; defaults to:'date_filter': { 'start_date': new Date().toISOString(), 'end_date': new Date('2017-12-31').toISOString() }
This is an object containing two keys with string values. The first key is
start_date
and the second isend_date
. Together these two keys limit the date range of events that will display on the map. -
date_boundaries
: Object; defaults to:'date_boundaries': { 'start_date': new Date().toISOString(), 'end_date': new Date('2017-12-31').toISOString() }
This is an object containing two keys with string values. The first key is
start_date
and the second isend_date
. Together these two keys limit the possible date range of searchable events.