This commit is contained in:
bastianonm 2012-10-18 13:10:05 +00:00
parent c771b0600a
commit e447cd8fcb
8 changed files with 127 additions and 37 deletions

View File

@ -24,7 +24,7 @@ function wpgpxmaps(params)
function unqueue()
{
if ((google == undefined || google.maps == undefined || Highcharts == undefined))
if (google == undefined || google.maps == undefined || Highcharts == undefined)
{
t = setTimeout("unqueue()",200);
}
@ -191,7 +191,7 @@ function _wpgpxmaps(params)
mapTypeIds: mapTypeIds
}
});
map.mapTypes.set("OSM1", new google.maps.ImageMapType({
getTileUrl: function(coord, zoom) {
return "http://tile.openstreetmap.org/" + zoom + "/" + coord.x + "/" + coord.y + ".png";
@ -223,7 +223,6 @@ function _wpgpxmaps(params)
var controlDiv = document.createElement('div');
controlDiv.style.padding = '5px';
// Set CSS for the control border
var controlUI = document.createElement('img');
controlUI.src = pluginUrl + "/wp-gpx-maps/img/expand.png";

Binary file not shown.

View File

@ -0,0 +1,83 @@
msgid ""
msgstr ""
"Project-Id-Version: wp-gpx-maps\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-08-01 13:41+0100\n"
"PO-Revision-Date: 2012-09-17 15:02+0100\n"
"Last-Translator: Biró Tamás <tami@freemail.hu>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../wp-gpx-maps.php:473
msgid "Altitude"
msgstr "Magasság"
#: ../wp-gpx-maps.php:474
msgid "Current Position"
msgstr "Aktuális pozíció"
#: ../wp-gpx-maps.php:475
msgid "Speed"
msgstr "Sebesség"
#: ../wp-gpx-maps.php:476
msgid "Heart rate"
msgstr "Szívritmus"
#: ../wp-gpx-maps.php:477
msgid "Cadence"
msgstr "Kadencia"
#: ../wp-gpx-maps.php:478
msgid "Go Full Screen"
msgstr "Teljes képernyő BE"
#: ../wp-gpx-maps.php:479
msgid "Exit Full Screen"
msgstr "Teljes képernyő KI"
#: ../wp-gpx-maps.php:492
msgid "Total distance"
msgstr "Teljes távolság"
#: ../wp-gpx-maps.php:497
msgid "Max elevation"
msgstr "Max magasság"
#: ../wp-gpx-maps.php:499
msgid "Min elevation"
msgstr "Min magasság"
#: ../wp-gpx-maps.php:501
msgid "Total climbing"
msgstr "Össz. emelkedés"
#: ../wp-gpx-maps.php:503
msgid "Total descent"
msgstr "Össz. ereszkedés"
#: ../wp-gpx-maps.php:507
msgid "Average speed"
msgstr "Átlagsebesség"
#: ../wp-gpx-maps.php:512
msgid "Total Time"
msgstr "Teljes Idő"
#: ../wp-gpx-maps.php:528
msgid "Download"
msgstr "Letöltés"
#: ../wp-gpx-maps_admin_settings.php:83
#: ../wp-gpx-maps_admin_settings.php:151
#: ../wp-gpx-maps_admin_settings.php:229
#: ../wp-gpx-maps_admin_settings.php:333
#: ../wp-gpx-maps_admin_settings.php:364
msgid "Save Changes"
msgstr "Beállítások mentése"

Binary file not shown.

View File

@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: wp-gpx-maps\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-08-09 16:39+0100\n"
"PO-Revision-Date: 2012-08-09 16:39+0100\n"
"PO-Revision-Date: 2012-10-17 23:41+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: tr_TR\n"
@ -12,6 +12,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: .\n"
"X-Generator: Poedit 1.5.4\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../wp-gpx-maps.php:472
@ -44,31 +45,31 @@ msgstr "Tam Ekrandan Çık"
#: ../wp-gpx-maps.php:491
msgid "Total distance"
msgstr ""
msgstr "Toplam Mesafe"
#: ../wp-gpx-maps.php:496
msgid "Max elevation"
msgstr ""
msgstr "Maks. İrtifa"
#: ../wp-gpx-maps.php:498
msgid "Min elevation"
msgstr ""
msgstr "Min. İrtifa"
#: ../wp-gpx-maps.php:500
msgid "Total climbing"
msgstr ""
msgstr "Toplam Tırmanış"
#: ../wp-gpx-maps.php:502
msgid "Total descent"
msgstr ""
msgstr "Toplam İniş"
#: ../wp-gpx-maps.php:506
msgid "Average speed"
msgstr ""
msgstr "Ortalama Hız"
#: ../wp-gpx-maps.php:511
msgid "Total Time"
msgstr ""
msgstr "Toplam Süre"
#: ../wp-gpx-maps.php:527
msgid "Download"
@ -78,4 +79,4 @@ msgstr "İndir"
#: ../wp-gpx-maps_admin_settings.php:229 ../wp-gpx-maps_admin_settings.php:333
#: ../wp-gpx-maps_admin_settings.php:364
msgid "Save Changes"
msgstr ""
msgstr "Değişiklikleri Kaydet"

View File

@ -2,10 +2,10 @@
Contributors: bastianonm
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8VHWLRW6JBTML
Tags: maps, gpx, gps, graph, chart, google maps, highcharts, track, garmin, image, nextgen-gallery, nextgen, exif, OpenStreetMap, OpenCycleMap, Hike&Bike, heart rate, heartrate, cadence
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.4
Stable tag: 1.1.37
Stable tag: 1.1.38
Draws a gpx track with altitude graph. You can also display your nextgen gallery images in the map.
@ -41,6 +41,7 @@ Translated into 7 languages:
- Dutch nl_NL
- Swedish sv_SE
- Turkish tr_TR
- Hungarian hu_HU
(many thanks to all the guys who helped me with the translations)
@ -173,6 +174,10 @@ Yes!
1. Altitude & Speed & Hearth rate
== Changelog ==
= 1.1.38 =
* Fix: garmin gpx cadence and heart rate
* Updated Turkish translation, thanks to Edip
* Added Hungarian translation, thanks to Tami
= 1.1.36 =
* Even Editor and Author users can upload their own gpx. Administrators can see all the administrators gpx. The other users can see only their uploads
= 1.1.35 =

View File

@ -3,7 +3,7 @@
Plugin Name: WP-GPX-Maps
Plugin URI: http://www.darwinner.it/
Description: Draws a gpx track with altitude graph
Version: 1.1.37
Version: 1.1.38
Author: Bastianon Massimo
Author URI: http://www.pedemontanadelgrappa.it/
*/
@ -43,19 +43,19 @@ function WP_GPX_Maps_action_links($links, $file) {
function enqueue_WP_GPX_Maps_scripts()
{
//wp_enqueue_script( 'jquery' );
wp_deregister_script( 'googleapis' );
wp_register_script( 'googleapis', 'https://maps.googleapis.com/maps/api/js?sensor=false&v=3.9', null, null);
wp_enqueue_script( 'googleapis' );
wp_deregister_script( 'WP-GPX-Maps' );
wp_register_script( 'WP-GPX-Maps', plugins_url('/WP-GPX-Maps.js', __FILE__), array('jquery'), "1.1.34");
wp_enqueue_script( 'WP-GPX-Maps' );
wp_enqueue_script( 'jquery' );
wp_deregister_script( 'googlemaps' );
wp_register_script( 'googlemaps', 'https://maps.googleapis.com/maps/api/js?sensor=false&v=3.9', null, null);
wp_enqueue_script( 'googlemaps' );
wp_deregister_script( 'highcharts' );
wp_register_script( 'highcharts', "http://code.highcharts.com/highcharts.js", array('jquery'), "2.3.2", true);
wp_enqueue_script( 'highcharts' );
wp_enqueue_script( 'highcharts' );
wp_deregister_script( 'WP-GPX-Maps' );
wp_register_script( 'WP-GPX-Maps', plugins_url('/WP-GPX-Maps.js', __FILE__), array('jquery','googlemaps','highcharts'), "1.1.34");
wp_enqueue_script( 'WP-GPX-Maps' );
}
@ -148,7 +148,7 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
$gpxurl = $gpx;
$cacheFileName = "$gpx,$w,$mh,$mt,$gh,$showW,$showHr,$showCad,$donotreducegpx,$pointsoffset,$showSpeed,$uomspeed,$uom,v1.1.32";
$cacheFileName = "$gpx,$w,$mh,$mt,$gh,$showW,$showHr,$showCad,$donotreducegpx,$pointsoffset,$showSpeed,$uomspeed,$uom,v1.1.38";
$cacheFileName = md5($cacheFileName);
@ -206,16 +206,16 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
$tot_len = 0;
}
}
$isGpxUrl = (preg_match('/^(http(s)?\:\/\/)/', trim($gpx)) == 1);
if ($points_maps == '' && $gpx != '')
if ((!isset($points_maps) || $points_maps == '') && $gpx != '')
{
$sitePath = sitePath();
$gpx = trim($gpx);
$isGpxUrl = (preg_match('/^(http(s)?\:\/\/)/', $gpx) == 1);
if ($isGpxUrl == true)
{
$gpx = downloadRemoteFile($gpx);
@ -314,9 +314,8 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
$points_graph_cad .= $points->cad[$i].',';
}
}
}
if ($uom == '1')
{
// Miles and feet
@ -571,7 +570,7 @@ function downloadRemoteFile($remoteFile)
try
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, urlencode($remoteFile));
curl_setopt($ch, CURLOPT_URL, str_replace(' ', '%20', $remoteFile));
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,5);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);

View File

@ -169,8 +169,8 @@
$trk->registerXPathNamespace('10', 'http://www.topografix.com/GPX/1/0');
$trk->registerXPathNamespace('11', 'http://www.topografix.com/GPX/1/1');
$trk->registerXPathNamespace('gpxtpx', 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1');
$trk->registerXPathNamespace('gpxtpx', 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1');
$trkpts = $trk->xpath('//trkpt | //10:trkpt | //11:trkpt');
$lastLat = 0;
@ -191,10 +191,13 @@
$speed = (float)$trkpt->speed;
$hr = 0;
$cad = 0;
if (isset($trkpt->extensions))
{
$_hr = @$trkpt->extensions->xpath('gpxtpx:TrackPointExtension/gpxtpx:hr/text()');
$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)
{
foreach ($_hr as $node) {
@ -202,7 +205,7 @@
}
}
$_cad = @$trkpt->extensions->xpath('gpxtpx:TrackPointExtension/gpxtpx:cad/text()');
$_cad = @$trkpt->xpath('extensions/gpxtpx:TrackPointExtension/gpxtpx:cad/text() | extensions/TrackPointExtension/cad/text()');
if ($_cad)
{
foreach ($_cad as $node) {