'Tracks', 'settings' => 'Settings', 'help' => "help" );
}
else if ( current_user_can('publish_posts') ) {
$tabs = array( 'tracks' => 'Tracks', 'help' => "help" );
}
echo '
';
foreach( $tabs as $tab => $name ){
$class = ( $tab == $current ) ? ' nav-tab-active' : '';
echo "$name";
}
echo '
';
}
function WP_GPX_Maps_html_page() {
$realGpxPath = gpxFolderPath();
$cacheGpxPath = gpxCacheFolderPath();
$relativeGpxPath = relativeGpxFolderPath();
$relativeGpxPath = str_replace("\\","/", $relativeGpxPath);
$tab = $_GET['tab'];
if ($tab == '')
$tab = 'tracks';
?>
WP GPX Settings
Can\'t create '.$realGpxPath.' folder. Please create it and make it writable!
If not, you will must update the file manually!
';
}
}
if(file_exists($cacheGpxPath) && is_dir($cacheGpxPath))
{
//dir exsist!
}
else
{
if (!@mkdir($cacheGpxPath,0755,true)) {
echo '
Can\'t create '.$cacheGpxPath.' folder. Please create it and make it writable!
If not, cache will not created and your site could be slower!
';
}
}
wpgpxmaps_ilc_admin_tabs($tab);
if ($tab == "tracks")
{
include 'wp-gpx-maps_admin_tracks.php';
}
else if ($tab == "settings")
{
include 'wp-gpx-maps_admin_settings.php';
}
else if ($tab == "help")
{
?>
The fastest way to use this plugin: upload the file using the uploader in the first tab, than copy the shortcode from the list and paste it in the pages/posts.
You can manually set the relative path to your gpx: [sgpx gpx="< gpx file name >"].
You can also use gpx from other sites: [sgpx gpx="http://www.someone.com/somewhere/somefile.gpx"]
Full set of attributes: [sgpx gpx="< gpx file name >"
>> read below all the optional attributes <<
]
- gpx: relative path to gpx
- width: width in pixels
- mheight: map height
- gheight: graph height
- mtype: map available types are: HYBRID, ROADMAP, SATELLITE, TERRAIN, OSM1 (Open Street Map), OSM2 (Open Cycle Map), OSM3 (Hike & Bike), OSM4 (Open Cycle Map - Transport), OSM5 (Open Cycle Map - Landscape), OSM6 (MapToolKit - Terrain)
- waypoints: print the gpx waypoints inside the map (default is FALSE)
- donotreducegpx: print all the point without reduce it (default is FALSE)
- pointsoffset: skip points closer than XX meters(default is 10)
- uom: distance/altitude possible unit of measure are: 0, 1, 2, 3, 4, 5 (0 = meters, 1 = feet/miles, 2 = meters/kilometers, 3 = meters/nautical miles, 4 = meters/miles, 5 = feet/nautical miles)
- mlinecolor: map line color (default is #3366cc)
- glinecolor: altitude line color (default is #3366cc)
- showspeed: show speed inside the chart (default is FALSE)
- showhr: show heart rate inside the chart (default is FALSE)
- showele: show elevation data inside the chart (default is TRUE)
- showcad: show cadence inside the chart (default is FALSE)
- showgrade: show grade inside the chart (default is FALSE)
- glinecolorspeed: speed line color (default is #ff0000)
- glinecolorhr: heart rate line color (default is #ff77bd)
- glinecolorcad: cadence line color (default is #beecff)
- glinecolorgrade: grade line color (default is #beecff)
- uomspeed: unit of measure for speed are: 0, 1, 2, 3, 4, 5 (0 = m/s, 1 = km/h, 2 = miles/h, 3 = min/km, 4 = min/miles, 5 = Nautical Miles/Hour (Knots), 6 = min/100 meters)
- chartFrom1: minimun value for altitude chart
- chartTo1: maxumin value for altitude chart
- chartFrom2: minimun value for speed chart
- chartTo2: maxumin value for speed chart
- startIcon: Start track icon
- endIcon: End track icon
- currentIcon: Current position icon (when mouse hover)
- waypointicon: waypoint custom icon
- nggalleries: NextGen Gallery id or a list of Galleries id separated by a comma
- ngimages: NextGen Image id or a list of Images id separated by a comma
- dtoffset: the difference (in seconds) between your gpx tool date and your camera date
- zoomonscrollwheel: zoom on map when mouse scroll wheel
- download: Allow users to download your GPX file
- skipcache: Do not use cache. If TRUE might be very slow (default is FALSE)
- summary: Print summary details of your GPX (default is FALSE)
- summarytotlen: Print Total distance in summary table (default is FALSE)
- summarymaxele: Print Max Elevation in summary table (default is FALSE)
- summaryminele: Print Min Elevation in summary table (default is FALSE)
- summaryeleup: Print Total climbing in summary table (default is FALSE)
- summaryeledown: Print Total descent in summary table (default is FALSE)
- summaryavgspeed: Print Average Speed in summary table (default is FALSE)
- summarytotaltime: Print Total time in summary table (default is FALSE)
Bugs, problems, thanks and anything else here!