*** TECHNICAL INFO *** Maps -- All maps in this system are generated by Mapbox (www.mapbox.com) Interactive / non-static maps: Mapbox GL JS API Static Maps (thumbnails): Mapbox Static Images API Data Storage -- When a GPX/KML file is uploaded to our system, a homemade PHP script scans the file for validity, then iterates through the waypoints and track/route segments, extracting coordinates, elevation and timestamps. All data is stored in geoJSON format in a MySQL database table. The originally uploaded file is retained, but not used again. Data Retrieval -- All trail data displayed throughout the system is extracted from MySQL database tables. I created a test to determine if it's faster to read from a database, or to re-scan the GPX/KML files each time the data is requested. MySQL won the race every time. Thumbnails -- You likely won't notice, but the thumbnails (with the green tracks) are generated using slimmed down versions of the full track. Mapbox's Static Images API has a maximum query length. First, the coordinate point array is run through a small script to delete every other array element until the array containes less than 1,000 coordinate points. Then, the array is converted to a Google Maps Encoded Polyline, then URL encoded and passed to Mapbox's Static Image API. When the image is returned, it's saved on our server. GPX File Downloads -- When a user downloads the GPX file for a trail, an internal script dynamically creates the file from the database each time the download is requested. The script builds the GPX file in compliance with the GPS Exchange Format XML schema, and adds some Wild West Jeeps stuff. *** IMMEDIATE & FUTURE PLANS *** Geolocation data from image uploads for image waypoints on map Trail grouping - uploader will be given the option to add their trail to an already existing area. For example: Someone uploads a track that is a variant of an existing track (different path, same destination). They can group it with the existing one and viewers can see both tracks on one trail page. Optional overlays (land management, topo, satellite, etc...) on the full map. Make tracks easier to click on the full map KML support for uploading and downloading *** CHANGELOG *** 01/11/2021: - fixed an issue where an extra space at the beginning or end of the trail name would result in a hyphen being added in the URL safe name 12/28/2020: - fixed an issue with the image uploader where images smaller than 1000x1000 pixels get a blank thumbnail 12/19/2020: - fixed trail name font sizing on index and list pages 12/18/2020: - added distances to elevation profile graphs on X axis - added min and max elevations for profile graphs, rounded to whole 100's (makes the graph more interesting) - added a corresponding location marker to small map when elevation profile line is hovered over 12/10/2020: - (map) fixed an issue where trails could not be clicked on when map zoomed out - (map) changed 3D terrain to appear at all zoom levels - (map) added sun calculations to determine sky atmosphere depending on map location and local time (also updates when map is panned) 12/08/2020: - (map) trails clustered using centerpoint at zoom level 8 and out for better visibility and searching - (map) clicking within 50px of part of a trail will still select that trail (easier to click with touch) - upgraded to Mapbox GL JS v2.0.0 - (map) 3D terrain now available starting at zoom level 7 and in 12/07/2020: - (map) sorted out ability to add vector overlays for BLM data (map controls to follow!) - (map) restricted main map to US bounds to prevent excessive loading of tiles in other countries - some nicer styling applied to the elevation profile graphs - added links to weather.gov for trail endpoint locations within their markers on trail info pages - upgraded to Mapbox GL JS v1.12.0 12/04/2020: - dynamically generated opengraph tags for sharing trail info links on social media - began making provisions for geographical polygon support (defined areas) - elevation profile graphs working using CanvasJS - miscellaneous performance tweaks 12/02/2020: - added some statistics to the trail homepage - trail thumbnail tracks are now dark orange for northern region and light green for southern region - placeholder added for trail notices: system under construction for submitting trail closures, weather, restrictions and such 11/27/2020: - added an option to download a condensed, or "minified" version of a GPX file (smaller file size, but not formatted for human readability) 11/16/2020: - added ability to upload pictures to a trail info page (supported: jpeg, jpg, png and gif) 10/12/2020: - new function on trail details page to add a waypoint to that trail - added lat/lon to end markers on trail info page maps 10/05/2020: - converted track and waypoint storage to associative arrays and updated all necessary files to support the conversion - added support for waypoint descriptions - added GPX file download counter - added unique identifier to download temp files to prevent mid-transfer overwriting 10/02/2020: - cleaned up older tracks to round all numbers to proper point precision, add elevations if missing, and delete duplicate points - added a function to ignore duplicate points in newly uploaded files - updated trail view page to count location points dynamically and no longer store a fixed number in the database 09/25/2020: - Better interface for trail details page - Added ascent and descent calculations to trail details page (no track smoothing, these values may be different than other apps or websites) 09/24/2020: - New upload interface with trail preview and statistics before finalizing (pre-upload) - DEM data now automatically added to any points missing elevation - Ascent and descent calculations added to pre-upload stats - Search bar added to trail list page (search by name) 08/24/2020: - Added custom dynamic GPX file generation script for downloads - Added waypoints to trail page map 08/22/2020: - New landing page, user experience and design improvements, new ratings & resources pages 04/26/2020: - Added support for uploading GPX files containing a route , rather than a track 11/14/2019: - Waypoints are now extracted and stored for use later 11/04/2019: T - elevation and timetamps are now extracted and stored for use later 11/03/2019: - All tracks are now placed into regions: Northern Nevada and Southern Nevada. Tonopah-ish is the latitudinal divider 10/28/2019: - New trail information page when a track is clicked on from the main map