* Fix: Garmin cadence

* Infowindows closing on mouseout
This commit is contained in:
bastianonm 2014-07-09 15:55:55 +00:00
parent 533bbc41f1
commit 2af057702a
4 changed files with 26 additions and 26 deletions

View File

@ -1199,6 +1199,14 @@ Author URI: http://www.pedemontanadelgrappa.it/
infowindow = new google.maps.InfoWindow({ content: cnt});
infowindow.open(map,m);
});
google.maps.event.addListener(m, "mouseout", function () {
if (infowindow)
{
infowindow.close();
}
});
}
function getItemFromArray(arr,index)

View File

@ -5,7 +5,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
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: 3.9
Stable tag: 1.3.3
Stable tag: 1.3.4
Draws a gpx track with altitude graph. You can also display your nextgen gallery images in the map.
@ -187,6 +187,9 @@ Yes!
1. Altitude & Speed & Hearth rate
== Changelog ==
= 1.3.4 =
* Fix: Garmin cadence
* Infowindows closing on mouseout
= 1.3.3 =
* Add feet/Nautical Miles units (thanks to elperepat)
* Update OpenStreetMaps Credits

View File

@ -3,7 +3,7 @@
Plugin Name: WP-GPX-Maps
Plugin URI: http://www.devfarm.it/
Description: Draws a GPX track with altitude chart
Version: 1.3.3
Version: 1.3.4
Author: Bastianon Massimo
Author URI: http://www.pedemontanadelgrappa.it/
*/
@ -249,7 +249,7 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
$gpxurl = $gpx;
$cacheFileName = "$gpx,$w,$mh,$mt,$gh,$showEle,$showW,$showHr,$showAtemp,$showCad,$donotreducegpx,$pointsoffset,$showSpeed,$showGrade,$uomspeed,$uom,$distanceType,v1.2.7";
$cacheFileName = "$gpx,$w,$mh,$mt,$gh,$showEle,$showW,$showHr,$showAtemp,$showCad,$donotreducegpx,$pointsoffset,$showSpeed,$showGrade,$uomspeed,$uom,$distanceType,v1.3.4";
$cacheFileName = md5($cacheFileName);

View File

@ -201,32 +201,21 @@
if (isset($trkpt->extensions))
{
$trkpt->registerXPathNamespace('gpxtpx', 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1');
$_hr = @$trkpt->xpath('extensions/gpxtpx:TrackPointExtension/gpxtpx:hr/text() | extensions/TrackPointExtension/hr/text()');
if ($_hr)
$_ext = @$trkpt->xpath('extensions/gpxtpx:TrackPointExtension | extensions/TrackPointExtension');
if ($_ext)
{
foreach ($_hr as $node) {
$hr = (float)$node;
if ($_ext[0])
{
$hr = @$_ext[0]->hr;
$atemp = @$_ext[0]->atemp;
$cad = @$_ext[0]->cad;
}
}
$_atemp = @$trkpt->xpath('extensions/gpxtpx:TrackPointExtension/gpxtpx:atemp/text() | extensions/TrackPointExtension/atemp/text()');
if ($_atemp)
{
foreach ($_atemp as $node) {
$atemp = (float)$node;
}
}
$_cad = @$trkpt->xpath('extensions/gpxtpx:TrackPointExtension/gpxtpx:cad/text() | extensions/TrackPointExtension/cad/text()');
if ($_cad)
{
foreach ($_cad as $node) {
$cad = (float)$node;
}
}
}
if ($lastLat == 0 && $lastLon == 0)
@ -239,9 +228,9 @@
array_push($points->ele, (float)round($ele,2));
array_push($points->dist, (float)round($dist,2));
array_push($points->speed, 0);
array_push($points->hr, $hr);
array_push($points->atemp, $atemp);
array_push($points->cad, $cad);
array_push($points->hr, (float)$hr);
array_push($points->atemp, (float)$atemp);
array_push($points->cad, (float)$cad);
array_push($points->grade, $grade);
$lastLat=$lat;