Skip to content
g33kgrrl edited this page Mar 23, 2013 · 6 revisions

HTML (full listing)

boundingbox.html

Temporary document for finding box shaped geo coordinates of an area based on window size of the web browser. This is used for building custom map tiles and including the geodata map area.

JavaScript (partial listing, assets/js/resources/ omitted)

assets/js/tidepools.js

Main Tidepools loading script, specifying local, cloud or hybrid map tiles, loading maps, landmarks and optional APIs. There are additional customization settings here too.

assets/js/tidepoolsframeworks/API_collect.js

If tidepools.js is set to load APIs, they are done here, by populating new map layers with representational landmarks for each API pulled from various sources.

assets/js/tidepoolsframeworks/dragdrop.js

Handler for drag dropping landmarks onto maps with various drop zones and creates a copy of what a user is dragging as a visual reference when dragging.

assets/js/tidepoolsframeworks/global_functions.js

Universal variables for all tidepools JS scripts. jQuery handlers for submitting landmarks, maps, comments to PHP. Dynamic content sizing functions (changing scroll view based on window size, etc.). Mobile check function to determine if user is on mobile device.

assets/js/tidepoolsframeworks/landmark_functions.js

Functions related to interacting with landmarks, from drag dropping handlers, including hidden values in form submissions, deleting landmarks, etc.

assets/js/tidepoolsframeworks/map_rendering.js

Loads maps and landmarks from PHP, based on objects inside the browsing window, handles landmark drawing and re-drawing based on zoom and pans from user.

PHP (full listing)

index.php

Main loading page

php/image_size.php

Returns image size of image (to determine proportional content scaling in map_rendering.js).

php/landmark_feed.php

Displays list view of appropriate landmarks, either those currently on map or those returned from search results.

php/landmark_feed_shouts.php

Displays list view of most recent comments from landmarks currently on map.

php/landmark_feed_single.php

Displays a single landmarks comment feed and general status.

php/landmark_filters_menu.php

Dynamically generates landmark filters menu, based on array stored in tidepools_variables.php

php/landmark_menu.php

Dynamically generates landmark menu, based on array stored in tidepools_variables.php

php/maps_collect.php

Finding all map layers visible to the current user.

php/maps_feed.php

Displaying list of all map layers visible to user

php/popup_content.php

Generates HTML content of all landmark popup windows, depending on variables passed to this file.

php/rebound.php

When a user pans or zooms in the mapping interface, this function is called to recalculate visible landmarks in the current window view, for all map layers. It also determines what time-based landmarks are visible based on the current time and each landmarks start and end time.

php/record_comment.php

Records comments to Mongo database via form submission.

php/record_landmark.php

Records landmarks to Mongo database via form submission.

php/record_map.php

Records map layers to Mongo database via form submission.

php/record_user.php

Placeholder for recording new users to Mongo database.

php/remove_landmark.php

Removes landmark from Database.

php/tidepools_variables.php

Universal variables for tidepools php functions. Holds name of Mongo collection right now, and arrays used for search and dynamic menu generation.