Version 1.3.9
Versione Retrieve waypoints in JSON, possibility to add a custom marker
This commit is contained in:
parent
f1a3523a32
commit
7ec4369b82
|
@ -1,11 +1,11 @@
|
|||
=== WP GPX Maps ===
|
||||
|
||||
Contributors: bastianonm, Stephan Klein
|
||||
Contributors: bastianonm, Stephan Klein, Michel Selerin
|
||||
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8VHWLRW6JBTML
|
||||
Tags: maps, gpx, gps, graph, chart, google maps, track, garmin, image, nextgen-gallery, nextgen, exif, OpenStreetMap, OpenCycleMap, Hike&Bike, heart rate, heartrate, cadence
|
||||
Requires at least: 2.0.0
|
||||
Tested up to: 4.3.1
|
||||
Stable tag: 1.3.8
|
||||
Stable tag: 1.3.9
|
||||
|
||||
Draws a gpx track with altitude graph. You can also display your nextgen gallery images in the map.
|
||||
|
||||
|
@ -195,6 +195,8 @@ Yes!
|
|||
1. Altitude & Speed & Hearth rate
|
||||
|
||||
== Changelog ==
|
||||
= 1.3.9 =
|
||||
* Retrieve waypoints in JSON, possibility to add a custom marker (Changed by Michel Selerin)
|
||||
= 1.3.8 =
|
||||
* Improved Google Maps visualization
|
||||
= 1.3.7 =
|
||||
|
|
|
@ -266,7 +266,7 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
|
|||
$mtime = 0;
|
||||
}
|
||||
|
||||
$cacheFileName = "$gpx,$mtime,$w,$mh,$mt,$gh,$showEle,$showW,$showHr,$showAtemp,$showCad,$donotreducegpx,$pointsoffset,$showSpeed,$showGrade,$uomspeed,$uom,$distanceType,v1.3.5";
|
||||
$cacheFileName = "$gpx,$mtime,$w,$mh,$mt,$gh,$showEle,$showW,$showHr,$showAtemp,$showCad,$donotreducegpx,$pointsoffset,$showSpeed,$showGrade,$uomspeed,$uom,$distanceType,v1.3.9";
|
||||
|
||||
$cacheFileName = md5($cacheFileName);
|
||||
|
||||
|
@ -511,12 +511,16 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
|
|||
}
|
||||
|
||||
$avg_speed = convertSpeed($avg_speed,$uomspeed,true);
|
||||
$waypoints = '[]';
|
||||
|
||||
if ($showW == true) {
|
||||
$wpoints = getWayPoints($gpx);
|
||||
/*
|
||||
foreach ($wpoints as $p) {
|
||||
$waypoints .= '['.number_format ( (float)$p[0] , 7 , '.' , '' ).','.number_format ( (float)$p[1] , 7 , '.' , '' ).',\''.unescape($p[4]).'\',\''.unescape($p[5]).'\',\''.unescape($p[7]).'\'],';
|
||||
}
|
||||
*/
|
||||
$waypoints = json_encode($wpoints);
|
||||
}
|
||||
|
||||
if ($showEle == "false")
|
||||
|
@ -630,7 +634,9 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
|
|||
</div>
|
||||
'. $error .'
|
||||
<script type="text/javascript">
|
||||
jQuery("#wpgpxmaps_'.$r.'").wpgpxmaps({ targetId : "'.$r.'",
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#wpgpxmaps_'.$r.'").wpgpxmaps({
|
||||
targetId : "'.$r.'",
|
||||
mapType : "'.$mt.'",
|
||||
mapData : ['.$points_maps.'],
|
||||
graphDist : ['.($hideGraph ? '' : $points_graph_dist).'],
|
||||
|
@ -640,7 +646,7 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
|
|||
graphAtemp : ['.($hideGraph ? '' : $points_graph_atemp).'],
|
||||
graphCad : ['.($hideGraph ? '' : $points_graph_cad).'],
|
||||
graphGrade : ['.($hideGraph ? '' : $points_graph_grade).'],
|
||||
waypoints : ['.$waypoints.'],
|
||||
waypoints : '.$waypoints.',
|
||||
unit : "'.$uom.'",
|
||||
unitspeed : "'.$uomspeed.'",
|
||||
color1 : ['.$colors_map.'],
|
||||
|
@ -678,6 +684,7 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
|
|||
backToCenter : "'.__("Back to center", "wp-gpx-maps").'"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
|
||||
// print summary
|
||||
|
|
|
@ -584,7 +584,6 @@
|
|||
$gpx->registerXPathNamespace('10', 'http://www.topografix.com/GPX/1/0');
|
||||
$gpx->registerXPathNamespace('11', 'http://www.topografix.com/GPX/1/1');
|
||||
$nodes = $gpx->xpath('//wpt | //10:wpt | //11:wpt');
|
||||
|
||||
global $wpdb;
|
||||
|
||||
if ( count($nodes) > 0 )
|
||||
|
|
Loading…
Reference in New Issue