From 20518e8960f5338a3d7fb1ef1b3eba02ed5290b5 Mon Sep 17 00:00:00 2001 From: bastianonm Date: Mon, 6 Aug 2012 09:54:48 +0000 Subject: [PATCH] --- WP-GPX-Maps.js | 31 ++++-- languages/wp-gpx-maps-it_IT.po | 172 ++++++++++++++++----------------- readme.txt | 14 ++- wp-gpx-maps.php | 5 +- wp-gpx-maps_admin.php | 1 + 5 files changed, 122 insertions(+), 101 deletions(-) diff --git a/WP-GPX-Maps.js b/WP-GPX-Maps.js index 57a0110..48d46b4 100644 --- a/WP-GPX-Maps.js +++ b/WP-GPX-Maps.js @@ -231,8 +231,7 @@ function _wpgpxmaps(params) controlUI.title = lng.gofullscreen; controlDiv.appendChild(controlUI); - // Setup the click event listeners: simply set the map to - // Chicago + // Setup the click event listeners google.maps.event.addDomListener(controlUI, 'click', function(event) { var isFullScreen = (controlUI.isfullscreen == true); var fullScreenCss = "position: absolute;left:0;top:0;"; @@ -303,7 +302,10 @@ function _wpgpxmaps(params) for (i=0; i < waypoints.length; i++) { - addWayPoint(map, image, shadow, waypoints[i][0], waypoints[i][1], waypoints[i][2], waypoints[i][3]); + var lat= waypoints[i][0]; + var lon= waypoints[i][1]; + addWayPoint(map, image, shadow, lat, lon, waypoints[i][2], waypoints[i][3]); + bounds.extend(new google.maps.LatLng(lat, lon)); } } @@ -592,11 +594,20 @@ function _wpgpxmaps(params) { var eleData = []; - + var myelemin = 99999; + var myelemax = -99999; + for (i=0; i myelemax) + myelemax = _graphEle; + if (_graphEle < myelemin) + myelemin = _graphEle; + } } var yaxe = { @@ -614,12 +625,18 @@ function _wpgpxmaps(params) yaxe.min = chartFrom1; yaxe.startOnTick = false; } + else { + yaxe.min = myelemin; + } if ( chartTo1 != '' ) { yaxe.max = chartTo1; yaxe.endOnTick = false; } + else { + yaxe.max = myelemax; + } hoptions.yAxis.push(yaxe); hoptions.series.push({ @@ -641,11 +658,11 @@ function _wpgpxmaps(params) if (unitspeed == '4') // min/miles { - l_s = { suf : "min/mi", dec : 2 }; + l_s = { suf : "min/mi", dec : 1 }; } else if (unitspeed == '3') // min/km { - l_s = { suf : "min/km", dec : 2 }; + l_s = { suf : "min/km", dec : 1 }; } else if (unitspeed == '2') // miles/h { diff --git a/languages/wp-gpx-maps-it_IT.po b/languages/wp-gpx-maps-it_IT.po index aea1bc0..422ebc8 100644 --- a/languages/wp-gpx-maps-it_IT.po +++ b/languages/wp-gpx-maps-it_IT.po @@ -1,86 +1,86 @@ -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-08-01 13:41+0100\n" -"Last-Translator: \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-Language: Italian\n" -"X-Poedit-Country: ITALY\n" -"X-Poedit-SearchPath-0: ..\n" - -#: ../wp-gpx-maps.php:473 -msgid "Altitude" -msgstr "Altitudine" - -#: ../wp-gpx-maps.php:474 -msgid "Current Position" -msgstr "Posizione Corrente" - -#: ../wp-gpx-maps.php:475 -msgid "Speed" -msgstr "Velocità" - -#: ../wp-gpx-maps.php:476 -msgid "Heart rate" -msgstr "Battito Cardiaco" - -#: ../wp-gpx-maps.php:477 -msgid "Cadence" -msgstr "Cadenza" - -#: ../wp-gpx-maps.php:478 -msgid "Go Full Screen" -msgstr "Schermo intero" - -#: ../wp-gpx-maps.php:479 -msgid "Exit Full Screen" -msgstr "Torna a dimensioni originali" - -#: ../wp-gpx-maps.php:492 -msgid "Total distance" -msgstr "Distanza totale" - -#: ../wp-gpx-maps.php:497 -msgid "Max elevation" -msgstr "Altitudine massima" - -#: ../wp-gpx-maps.php:499 -msgid "Min elevation" -msgstr "Altitudine minima" - -#: ../wp-gpx-maps.php:501 -msgid "Total climbing" -msgstr "Totale salita" - -#: ../wp-gpx-maps.php:503 -msgid "Total descent" -msgstr "Totale discesa" - -#: ../wp-gpx-maps.php:507 -msgid "Average speed" -msgstr "Velocità media" - -#: ../wp-gpx-maps.php:512 -#, fuzzy -msgid "Total Time" -msgstr "Distanza totale" - -#: ../wp-gpx-maps.php:528 -msgid "Download" -msgstr "Scarica" - -#: ../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 "Salva" - +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-08-01 13:41+0100\n" +"Last-Translator: \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-Language: Italian\n" +"X-Poedit-Country: ITALY\n" +"X-Poedit-SearchPath-0: ..\n" + +#: ../wp-gpx-maps.php:473 +msgid "Altitude" +msgstr "Altitudine" + +#: ../wp-gpx-maps.php:474 +msgid "Current Position" +msgstr "Posizione Corrente" + +#: ../wp-gpx-maps.php:475 +msgid "Speed" +msgstr "Velocità" + +#: ../wp-gpx-maps.php:476 +msgid "Heart rate" +msgstr "Battito Cardiaco" + +#: ../wp-gpx-maps.php:477 +msgid "Cadence" +msgstr "Cadenza" + +#: ../wp-gpx-maps.php:478 +msgid "Go Full Screen" +msgstr "Schermo intero" + +#: ../wp-gpx-maps.php:479 +msgid "Exit Full Screen" +msgstr "Torna a dimensioni originali" + +#: ../wp-gpx-maps.php:492 +msgid "Total distance" +msgstr "Distanza totale" + +#: ../wp-gpx-maps.php:497 +msgid "Max elevation" +msgstr "Altitudine massima" + +#: ../wp-gpx-maps.php:499 +msgid "Min elevation" +msgstr "Altitudine minima" + +#: ../wp-gpx-maps.php:501 +msgid "Total climbing" +msgstr "Totale salita" + +#: ../wp-gpx-maps.php:503 +msgid "Total descent" +msgstr "Totale discesa" + +#: ../wp-gpx-maps.php:507 +msgid "Average speed" +msgstr "Velocità media" + +#: ../wp-gpx-maps.php:512 +#, fuzzy +msgid "Total Time" +msgstr "Distanza totale" + +#: ../wp-gpx-maps.php:528 +msgid "Download" +msgstr "Scarica" + +#: ../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 "Salva" + diff --git a/readme.txt b/readme.txt index 32fc1f7..fc81aa5 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i Tags: maps, gpx, gps, graph, chart, google maps, highcharts, 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.32 +Stable tag: 1.1.33 License: GPLv2 or later Draws a gpx track with altitude graph. You can also display your nextgen gallery images in the map. @@ -42,7 +42,7 @@ Translated into 7 languages: Try this plugin: http://www.pedemontanadelgrappa.it/category/mappe/ -Support Forum +Support Forum Supported gpx namespaces are: @@ -54,7 +54,7 @@ Supported gpx namespaces are: 1. http://www.garmin.com/xmlschemas/TrackPointExtension/v1 -Thanks to: www.securcube.net, www.darwinner.it, www.pedemontanadelgrappa.it, +Thanks to: www.securcube.net, www.devfarm.it, www.pedemontanadelgrappa.it, == Installation == @@ -126,12 +126,12 @@ The attributes are: 1. ngimages: NextGen Image id or a list of Images id separated by a comma +1. dtoffset: the difference (in seconds) between your gpx tool date and your camera date + 1. zoomonscrollwheel: zoom on map when mouse scroll wheel 1. download: Allow users to download your GPX file -1. dtoffset: the difference (in seconds) between your gpx tool date and your camera date - 1. skipcache: Do not use cache. If TRUE might be very slow (default is FALSE) 1. summary: Print summary details of your GPX (default is FALSE) @@ -165,6 +165,10 @@ Yes! 1. Altitude & Speed & Hearth rate == Changelog == += 1.1.33 = +* Decimals reducted to 1 for unit of measure min/km and min/mi +* map zoom and center position is working with waypoints only files +* automatic scale works again (thanks to MArkus) = 1.1.32 = * You can exclude cache (slower and not recommended) * You can decide what show in the summary table diff --git a/wp-gpx-maps.php b/wp-gpx-maps.php index 661c378..70d619a 100644 --- a/wp-gpx-maps.php +++ b/wp-gpx-maps.php @@ -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.32 +Version: 1.1.33 Author: Bastianon Massimo Author URI: http://www.pedemontanadelgrappa.it/ License: GPL @@ -51,7 +51,7 @@ function enqueue_WP_GPX_Maps_scripts() 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.31"); + wp_register_script( 'WP-GPX-Maps', plugins_url('/WP-GPX-Maps.js', __FILE__), array('jquery'), "1.1.33"); wp_enqueue_script( 'WP-GPX-Maps' ); wp_deregister_script( 'highcharts' ); @@ -159,7 +159,6 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='') @mkdir($gpxcache,0755,true); $gpxcache.= DIRECTORY_SEPARATOR.$cacheFileName.".tmp"; - // Try to load cache if (file_exists($gpxcache) && !($skipcache == true)) diff --git a/wp-gpx-maps_admin.php b/wp-gpx-maps_admin.php index d0313d3..e7c3bf3 100644 --- a/wp-gpx-maps_admin.php +++ b/wp-gpx-maps_admin.php @@ -116,6 +116,7 @@ function WP_GPX_Maps_html_page() {
  • currentIcon: Current position icon (when mouse hover)
  • 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 (default is FALSE)
  • download: Allow users to download your GPX file (default is FALSE)
  • summary: Print symmary details of your GPX (default is FALSE)