Contains all map related functions for loading and controlling the map page.
Add POI's of a certain category to the map if it is a match with the user's input through the search bar.
// Add matching POIs KUMobile.Map.addPOIs(categoryData);
Removes all markers from the map and then clears them from the array.
Filters the map POI's to only add markers that the user searched for!
// Filter! KUMobile.Map.filterMap();
Initialize the leaflet map with category data, list and basic settings.
// Initialize leaflet map KUMobile.Map.initializeMap();
Reads POI's from local file system. Note that if this fails, we will attempt to download the failed category!
// Update POIs KUMobile.Map.readPOIData();
Shows the footer with POI detail information at the bottom of the map.
// Show POI details KUMobile.Map.showPOIDetails(poi)
Updates POI data for every category in the category list.
// Update POIs KUMobile.Map.updatePOIData();
Northeast latitude for map's bounding box. Essentially most northeast latitude for POI's we are concerned with to show the user.
Northeast longitude for map's bounding box. Essentially most northeast longitude for POI's we are concerned with to show the user.
Southwest latitude for map's bounding box. Essentially most southwest latitude for POI's we are concerned with to show the user.
Southwest longitude for map's bounding box. Essentially most southwest longitude for POI's we are concerned with to show the user.
List of POI categories (order that they will be downloaded in) containing the corresponding foursquare ID's.
Enables debug messages via alert messages. Do NOT enable this unless there are legitimate problems with plugins (not available to debug via browser).
The index related to categories for which we are currently downloading or importing from a cached session.
Wait time for incremental searching. This distinguishes how long to wait after the user has searched something, before we assume they are done typing.
Represents the last value the user has searched for from the free text field search bar located on the map page.
Tells whether or not map is currently attempting to download or parse article lists. Essentially used to tell whether map is considered to be busy.
File template for local storage of foursquare map data for each category. E.g for saving food it would be MAPDATAFood filename.
This is the minimum time that needs to have passed in order to allow for another foursquare update to both the map and local filesystem.
Contains the selected marker. This is useful to store so we can easily disable the markers selection.
The 'version' of how we save map data to local filesystem. Whenever the structure of this changes, we must change the serialized ID. When we notice the ID change a new download will be triggered!
Starting center of the map as a coordinate array.
Default: [43.013070, -83.713853]
Triggered when the user does a direct change. The direct change includes typing then changing focus or pressing the clear button. This is redundant to the incremental search event, except for the clear button!!
Triggered when the user does a key up event in order to simulate incremental searching for the attached search bar.
User's location was found! Add it to the map as a blue circle including an accuracy circle.
User has clicked the map. We can use this as a way to exit the footer! Then also deselect the marker
Triggered when the user clicks on a POI marker.
Deselects the currently selected marker from the map. Basically it only switches the icon back to the 'non-selected' icon.
Triggered when the map page is first created based on jQuery Mobile pagecreate event. This is called after the page itself is created but before any jQuery Mobile styling is applied.
Triggered when the map page is first initialized based on jQuery Mobile pageinit event.
Triggered after a failed read of POI file.
Triggered after a successful read of POI file.