* fix: http/https javascript registration
* fix: full screen map css issue
This commit is contained in:
parent
410253dd4a
commit
20618fdf99
|
@ -266,7 +266,8 @@ Author URI: http://www.pedemontanadelgrappa.it/
|
||||||
css('left', 0).
|
css('left', 0).
|
||||||
css("width", '100%').
|
css("width", '100%').
|
||||||
css("height", '100%').
|
css("height", '100%').
|
||||||
css("z-index", '100');
|
css("z-index", '100'),
|
||||||
|
css("z-index", '100000');
|
||||||
jQuery("#wpadminbar").each(function(){
|
jQuery("#wpadminbar").each(function(){
|
||||||
jQuery(mapDiv).css('top', jQuery(this).height());
|
jQuery(mapDiv).css('top', jQuery(this).height());
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,8 +4,8 @@ Contributors: bastianonm
|
||||||
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8VHWLRW6JBTML
|
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8VHWLRW6JBTML
|
||||||
Tags: maps, gpx, gps, graph, chart, google maps, 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
|
Requires at least: 2.0.0
|
||||||
Tested up to: 3.8
|
Tested up to: 3.9
|
||||||
Stable tag: 1.3.0
|
Stable tag: 1.3.1
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
@ -187,6 +187,9 @@ Yes!
|
||||||
1. Altitude & Speed & Hearth rate
|
1. Altitude & Speed & Hearth rate
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
= 1.3.1 =
|
||||||
|
* fix: http/https javascript registration
|
||||||
|
* fix: full screen map css issue
|
||||||
= 1.3.0 =
|
= 1.3.0 =
|
||||||
* Speed improvement
|
* Speed improvement
|
||||||
* Rewritten js classes
|
* Rewritten js classes
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
/*
|
/*
|
||||||
Plugin Name: WP-GPX-Maps
|
Plugin Name: WP-GPX-Maps
|
||||||
Plugin URI: http://www.devfarm.it/
|
Plugin URI: http://www.devfarm.it/
|
||||||
Description: Draws a gpx track with altitude graph
|
Description: Draws a GPX track with altitude chart
|
||||||
Version: 1.3.0
|
Version: 1.3.1
|
||||||
Author: Bastianon Massimo
|
Author: Bastianon Massimo
|
||||||
Author URI: http://www.pedemontanadelgrappa.it/
|
Author URI: http://www.pedemontanadelgrappa.it/
|
||||||
*/
|
*/
|
||||||
|
@ -48,21 +48,10 @@ function WP_GPX_Maps_action_links($links, $file) {
|
||||||
|
|
||||||
function enqueue_WP_GPX_Maps_scripts()
|
function enqueue_WP_GPX_Maps_scripts()
|
||||||
{
|
{
|
||||||
|
|
||||||
wp_enqueue_script( 'jquery' );
|
wp_enqueue_script( 'jquery' );
|
||||||
|
wp_enqueue_script( 'googlemaps', '//maps.googleapis.com/maps/api/js?sensor=false', null, null);
|
||||||
wp_deregister_script( 'googlemaps' );
|
wp_enqueue_script( 'highcharts', "//code.highcharts.com/highcharts.js", array('jquery'), "2.3.3", true);
|
||||||
wp_register_script( 'googlemaps', 'https://maps.googleapis.com/maps/api/js?sensor=false&v=3.9', null, null);
|
wp_enqueue_script( 'WP-GPX-Maps', plugins_url('/WP-GPX-Maps.js', __FILE__), array('jquery','googlemaps','highcharts'), "1.3.0");
|
||||||
wp_enqueue_script( 'googlemaps' );
|
|
||||||
|
|
||||||
wp_deregister_script( 'highcharts' );
|
|
||||||
wp_register_script( 'highcharts', "http://code.highcharts.com/highcharts.js", array('jquery'), "2.3.3", true);
|
|
||||||
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.3.0");
|
|
||||||
wp_enqueue_script( 'WP-GPX-Maps' );
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_WP_GPX_Maps_scripts()
|
function print_WP_GPX_Maps_scripts()
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo "File $gpxPath not found!";
|
echo "WP GPX Maps Error: File $gpxPath not found!";
|
||||||
}
|
}
|
||||||
|
|
||||||
// reduce the points to around 200 to speedup
|
// reduce the points to around 200 to speedup
|
||||||
|
@ -160,8 +160,6 @@
|
||||||
$gpx->registerXPathNamespace('11', 'http://www.topografix.com/GPX/1/1');
|
$gpx->registerXPathNamespace('11', 'http://www.topografix.com/GPX/1/1');
|
||||||
$gpx->registerXPathNamespace('gpxtpx', 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1');
|
$gpx->registerXPathNamespace('gpxtpx', 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1');
|
||||||
|
|
||||||
$count_wpt = count( $gpx->xpath('//wpt | //10:wpt | //11:wpt') );
|
|
||||||
|
|
||||||
$nodes = $gpx->xpath('//trk | //10:trk | //11:trk');
|
$nodes = $gpx->xpath('//trk | //10:trk | //11:trk');
|
||||||
|
|
||||||
//normal gpx
|
//normal gpx
|
||||||
|
@ -510,15 +508,7 @@
|
||||||
unset($nodes);
|
unset($nodes);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
if ($count_wpt == 0)
|
|
||||||
{
|
|
||||||
echo "Empty Gpx or not supported File!";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -532,8 +522,13 @@
|
||||||
$points = array();
|
$points = array();
|
||||||
if (file_exists($gpxPath))
|
if (file_exists($gpxPath))
|
||||||
{
|
{
|
||||||
$points = array();
|
try {
|
||||||
$gpx = simplexml_load_file($gpxPath);
|
$gpx = simplexml_load_file($gpxPath);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo "WP GPX Maps Error: Cant parse xml file " . $gpxPath;
|
||||||
|
return $points;
|
||||||
|
}
|
||||||
|
|
||||||
$gpx->registerXPathNamespace('10', 'http://www.topografix.com/GPX/1/0');
|
$gpx->registerXPathNamespace('10', 'http://www.topografix.com/GPX/1/0');
|
||||||
$gpx->registerXPathNamespace('11', 'http://www.topografix.com/GPX/1/1');
|
$gpx->registerXPathNamespace('11', 'http://www.topografix.com/GPX/1/1');
|
||||||
$nodes = $gpx->xpath('//wpt | //10:wpt | //11:wpt');
|
$nodes = $gpx->xpath('//wpt | //10:wpt | //11:wpt');
|
||||||
|
|
Loading…
Reference in New Issue