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;
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<valLen; i++)
{
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 = {
@ -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
{

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
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: <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:
@ -54,7 +54,7 @@ Supported gpx namespaces are:
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 ==
@ -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

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.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' );
@ -160,7 +160,6 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
$gpxcache.= DIRECTORY_SEPARATOR.$cacheFileName.".tmp";
// Try to load cache
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>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>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>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>