This commit is contained in:
bastianonm 2012-08-06 09:54:48 +00:00
parent 89cfec978e
commit 20518e8960
5 changed files with 122 additions and 101 deletions

View File

@ -231,8 +231,7 @@ function _wpgpxmaps(params)
controlUI.title = lng.gofullscreen; controlUI.title = lng.gofullscreen;
controlDiv.appendChild(controlUI); controlDiv.appendChild(controlUI);
// Setup the click event listeners: simply set the map to // Setup the click event listeners
// Chicago
google.maps.event.addDomListener(controlUI, 'click', function(event) { google.maps.event.addDomListener(controlUI, 'click', function(event) {
var isFullScreen = (controlUI.isfullscreen == true); var isFullScreen = (controlUI.isfullscreen == true);
var fullScreenCss = "position: absolute;left:0;top:0;"; var fullScreenCss = "position: absolute;left:0;top:0;";
@ -303,7 +302,10 @@ function _wpgpxmaps(params)
for (i=0; i < waypoints.length; i++) 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 eleData = [];
var myelemin = 99999;
var myelemax = -99999;
for (i=0; i<valLen; i++) for (i=0; i<valLen; i++)
{ {
if (graphDist[i] != null) if (graphDist[i] != null)
eleData.push([graphDist[i],graphEle[i]]); {
var _graphEle = graphEle[i];
eleData.push([graphDist[i],_graphEle]);
if (_graphEle > myelemax)
myelemax = _graphEle;
if (_graphEle < myelemin)
myelemin = _graphEle;
}
} }
var yaxe = { var yaxe = {
@ -614,12 +625,18 @@ function _wpgpxmaps(params)
yaxe.min = chartFrom1; yaxe.min = chartFrom1;
yaxe.startOnTick = false; yaxe.startOnTick = false;
} }
else {
yaxe.min = myelemin;
}
if ( chartTo1 != '' ) if ( chartTo1 != '' )
{ {
yaxe.max = chartTo1; yaxe.max = chartTo1;
yaxe.endOnTick = false; yaxe.endOnTick = false;
} }
else {
yaxe.max = myelemax;
}
hoptions.yAxis.push(yaxe); hoptions.yAxis.push(yaxe);
hoptions.series.push({ hoptions.series.push({
@ -641,11 +658,11 @@ function _wpgpxmaps(params)
if (unitspeed == '4') // min/miles 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 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 else if (unitspeed == '2') // miles/h
{ {

View File

@ -1,86 +1,86 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: wp-gpx-maps\n" "Project-Id-Version: wp-gpx-maps\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-08-01 13:41+0100\n" "POT-Creation-Date: 2012-08-01 13:41+0100\n"
"PO-Revision-Date: 2012-08-01 13:41+0100\n" "PO-Revision-Date: 2012-08-01 13:41+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: __;_e\n" "X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: .\n" "X-Poedit-Basepath: .\n"
"X-Poedit-Language: Italian\n" "X-Poedit-Language: Italian\n"
"X-Poedit-Country: ITALY\n" "X-Poedit-Country: ITALY\n"
"X-Poedit-SearchPath-0: ..\n" "X-Poedit-SearchPath-0: ..\n"
#: ../wp-gpx-maps.php:473 #: ../wp-gpx-maps.php:473
msgid "Altitude" msgid "Altitude"
msgstr "Altitudine" msgstr "Altitudine"
#: ../wp-gpx-maps.php:474 #: ../wp-gpx-maps.php:474
msgid "Current Position" msgid "Current Position"
msgstr "Posizione Corrente" msgstr "Posizione Corrente"
#: ../wp-gpx-maps.php:475 #: ../wp-gpx-maps.php:475
msgid "Speed" msgid "Speed"
msgstr "Velocità" msgstr "Velocità"
#: ../wp-gpx-maps.php:476 #: ../wp-gpx-maps.php:476
msgid "Heart rate" msgid "Heart rate"
msgstr "Battito Cardiaco" msgstr "Battito Cardiaco"
#: ../wp-gpx-maps.php:477 #: ../wp-gpx-maps.php:477
msgid "Cadence" msgid "Cadence"
msgstr "Cadenza" msgstr "Cadenza"
#: ../wp-gpx-maps.php:478 #: ../wp-gpx-maps.php:478
msgid "Go Full Screen" msgid "Go Full Screen"
msgstr "Schermo intero" msgstr "Schermo intero"
#: ../wp-gpx-maps.php:479 #: ../wp-gpx-maps.php:479
msgid "Exit Full Screen" msgid "Exit Full Screen"
msgstr "Torna a dimensioni originali" msgstr "Torna a dimensioni originali"
#: ../wp-gpx-maps.php:492 #: ../wp-gpx-maps.php:492
msgid "Total distance" msgid "Total distance"
msgstr "Distanza totale" msgstr "Distanza totale"
#: ../wp-gpx-maps.php:497 #: ../wp-gpx-maps.php:497
msgid "Max elevation" msgid "Max elevation"
msgstr "Altitudine massima" msgstr "Altitudine massima"
#: ../wp-gpx-maps.php:499 #: ../wp-gpx-maps.php:499
msgid "Min elevation" msgid "Min elevation"
msgstr "Altitudine minima" msgstr "Altitudine minima"
#: ../wp-gpx-maps.php:501 #: ../wp-gpx-maps.php:501
msgid "Total climbing" msgid "Total climbing"
msgstr "Totale salita" msgstr "Totale salita"
#: ../wp-gpx-maps.php:503 #: ../wp-gpx-maps.php:503
msgid "Total descent" msgid "Total descent"
msgstr "Totale discesa" msgstr "Totale discesa"
#: ../wp-gpx-maps.php:507 #: ../wp-gpx-maps.php:507
msgid "Average speed" msgid "Average speed"
msgstr "Velocità media" msgstr "Velocità media"
#: ../wp-gpx-maps.php:512 #: ../wp-gpx-maps.php:512
#, fuzzy #, fuzzy
msgid "Total Time" msgid "Total Time"
msgstr "Distanza totale" msgstr "Distanza totale"
#: ../wp-gpx-maps.php:528 #: ../wp-gpx-maps.php:528
msgid "Download" msgid "Download"
msgstr "Scarica" msgstr "Scarica"
#: ../wp-gpx-maps_admin_settings.php:83 #: ../wp-gpx-maps_admin_settings.php:83
#: ../wp-gpx-maps_admin_settings.php:151 #: ../wp-gpx-maps_admin_settings.php:151
#: ../wp-gpx-maps_admin_settings.php:229 #: ../wp-gpx-maps_admin_settings.php:229
#: ../wp-gpx-maps_admin_settings.php:333 #: ../wp-gpx-maps_admin_settings.php:333
#: ../wp-gpx-maps_admin_settings.php:364 #: ../wp-gpx-maps_admin_settings.php:364
msgid "Save Changes" msgid "Save Changes"
msgstr "Salva" msgstr "Salva"

View File

@ -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 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 Requires at least: 2.0.0
Tested up to: 3.4 Tested up to: 3.4
Stable tag: 1.1.32 Stable tag: 1.1.33
License: GPLv2 or later License: GPLv2 or later
Draws a gpx track with altitude graph. You can also display your nextgen gallery images in the map. 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: <a href="http://www.pedemontanadelgrappa.it/category/mappe/">http://www.pedemontanadelgrappa.it/category/mappe/</a> Try this plugin: <a href="http://www.pedemontanadelgrappa.it/category/mappe/">http://www.pedemontanadelgrappa.it/category/mappe/</a>
<a href="http://www.darwinner.it/forums/forum/wp-gpx-maps/">Support Forum</a> <a href="http://www.devfarm.it/forums/forum/wp-gpx-maps/">Support Forum</a>
Supported gpx namespaces are: Supported gpx namespaces are:
@ -54,7 +54,7 @@ Supported gpx namespaces are:
1. http://www.garmin.com/xmlschemas/TrackPointExtension/v1 1. http://www.garmin.com/xmlschemas/TrackPointExtension/v1
Thanks to: <a href="http://www.securcube.net/">www.securcube.net</a>, <a href="http://www.darwinner.it/">www.darwinner.it</a>, <a href="http://www.pedemontanadelgrappa.it/">www.pedemontanadelgrappa.it</a>, Thanks to: <a href="http://www.securcube.net/">www.securcube.net</a>, <a href="http://www.devfarm.it/">www.devfarm.it</a>, <a href="http://www.pedemontanadelgrappa.it/">www.pedemontanadelgrappa.it</a>,
== Installation == == Installation ==
@ -126,12 +126,12 @@ The attributes are:
1. ngimages: NextGen Image id or a list of Images id separated by a comma 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. zoomonscrollwheel: zoom on map when mouse scroll wheel
1. download: Allow users to download your GPX file 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. 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) 1. summary: Print summary details of your GPX (default is FALSE)
@ -165,6 +165,10 @@ Yes!
1. Altitude & Speed & Hearth rate 1. Altitude & Speed & Hearth rate
== Changelog == == 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 = = 1.1.32 =
* You can exclude cache (slower and not recommended) * You can exclude cache (slower and not recommended)
* You can decide what show in the summary table * You can decide what show in the summary table

View File

@ -3,7 +3,7 @@
Plugin Name: WP-GPX-Maps Plugin Name: WP-GPX-Maps
Plugin URI: http://www.darwinner.it/ Plugin URI: http://www.darwinner.it/
Description: Draws a gpx track with altitude graph Description: Draws a gpx track with altitude graph
Version: 1.1.32 Version: 1.1.33
Author: Bastianon Massimo Author: Bastianon Massimo
Author URI: http://www.pedemontanadelgrappa.it/ Author URI: http://www.pedemontanadelgrappa.it/
License: GPL License: GPL
@ -51,7 +51,7 @@ function enqueue_WP_GPX_Maps_scripts()
wp_enqueue_script( 'googleapis' ); wp_enqueue_script( 'googleapis' );
wp_deregister_script( 'WP-GPX-Maps' ); 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_enqueue_script( 'WP-GPX-Maps' );
wp_deregister_script( 'highcharts' ); wp_deregister_script( 'highcharts' );
@ -159,7 +159,6 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
@mkdir($gpxcache,0755,true); @mkdir($gpxcache,0755,true);
$gpxcache.= DIRECTORY_SEPARATOR.$cacheFileName.".tmp"; $gpxcache.= DIRECTORY_SEPARATOR.$cacheFileName.".tmp";
// Try to load cache // Try to load cache
if (file_exists($gpxcache) && !($skipcache == true)) if (file_exists($gpxcache) && !($skipcache == true))

View File

@ -116,6 +116,7 @@ function WP_GPX_Maps_html_page() {
<li><b>currentIcon</b>: Current position icon (when mouse hover)</li> <li><b>currentIcon</b>: Current position icon (when mouse hover)</li>
<li><b>nggalleries</b>: NextGen Gallery id or a list of Galleries id separated by a comma</li> <li><b>nggalleries</b>: NextGen Gallery id or a list of Galleries id separated by a comma</li>
<li><b>ngimages</b>: NextGen Image id or a list of Images id separated by a comma</li> <li><b>ngimages</b>: NextGen Image id or a list of Images id separated by a comma</li>
<li><b>dtoffset</b>: the difference (in seconds) between your gpx tool date and your camera date</li>
<li><b>zoomonscrollwheel</b>: zoom on map when mouse scroll wheel (default is FALSE)</li> <li><b>zoomonscrollwheel</b>: zoom on map when mouse scroll wheel (default is FALSE)</li>
<li><b>download</b>: Allow users to download your GPX file (default is FALSE)</li> <li><b>download</b>: Allow users to download your GPX file (default is FALSE)</li>
<li><b>summary</b>: Print symmary details of your GPX (default is FALSE)</li> <li><b>summary</b>: Print symmary details of your GPX (default is FALSE)</li>