This commit is contained in:
parent
a86830c98c
commit
d8c8b92e69
|
@ -118,6 +118,55 @@ function setup()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function FullScreenControl(controlDiv, map) {
|
||||||
|
|
||||||
|
// Set CSS styles for the DIV containing the control
|
||||||
|
// Setting padding to 5 px will offset the control
|
||||||
|
// from the edge of the map
|
||||||
|
controlDiv.style.padding = '5px';
|
||||||
|
|
||||||
|
// Set CSS for the control border
|
||||||
|
var controlUI = document.createElement('div');
|
||||||
|
controlUI.style.backgroundColor = 'white';
|
||||||
|
controlUI.style.borderStyle = 'solid';
|
||||||
|
controlUI.style.borderWidth = '2px';
|
||||||
|
controlUI.style.cursor = 'pointer';
|
||||||
|
controlUI.style.textAlign = 'center';
|
||||||
|
controlUI.title = 'Go full screen';
|
||||||
|
controlDiv.appendChild(controlUI);
|
||||||
|
|
||||||
|
// Set CSS for the control interior
|
||||||
|
var controlText = document.createElement('div');
|
||||||
|
controlText.style.fontFamily = 'Arial,sans-serif';
|
||||||
|
controlText.style.fontSize = '12px';
|
||||||
|
controlText.style.paddingLeft = '4px';
|
||||||
|
controlText.style.paddingRight = '4px';
|
||||||
|
controlText.innerHTML = '<b>Full Screen</b>';
|
||||||
|
controlUI.appendChild(controlText);
|
||||||
|
|
||||||
|
// Setup the click event listeners: simply set the map to
|
||||||
|
// Chicago
|
||||||
|
google.maps.event.addDomListener(controlUI, 'click', function(event) {
|
||||||
|
var isFullScreen = (controlUI.isfullscreen == true);
|
||||||
|
var fullScreenCss = "position: absolute;left:0;top:0;";
|
||||||
|
var mapDiv = map.getDiv();
|
||||||
|
if (isFullScreen)
|
||||||
|
{
|
||||||
|
jQuery(mapDiv).attr('oldStyle', jQuery(mapDiv).attr('style'));
|
||||||
|
jQuery(mapDiv).attr('style', fullScreenCss);
|
||||||
|
jQuery(controlUI).html("<b>Exit Full Screen</b>");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
jQuery(mapDiv).attr('style', jQuery(mapDiv).attr('oldStyle'));
|
||||||
|
jQuery(controlUI).html("<b>Full Screen</b>");
|
||||||
|
}
|
||||||
|
controlUI.isfullscreen = !isFullScreen;
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function _wpgpxmaps(params)
|
function _wpgpxmaps(params)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -207,6 +256,11 @@ function _wpgpxmaps(params)
|
||||||
maxZoom: 18
|
maxZoom: 18
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
//var fullScreenControlDiv = document.createElement('div');
|
||||||
|
//var fullScreenControl = new FullScreenControl(fullScreenControlDiv, map);
|
||||||
|
//fullScreenControlDiv.index = 1;
|
||||||
|
//map.controls[google.maps.ControlPosition.TOP_RIGHT].push(fullScreenControlDiv);
|
||||||
|
|
||||||
var bounds = new google.maps.LatLngBounds();
|
var bounds = new google.maps.LatLngBounds();
|
||||||
|
|
||||||
// Print WayPoints
|
// Print WayPoints
|
||||||
|
|
|
@ -3,8 +3,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, 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.3
|
Tested up to: 3.4
|
||||||
Stable tag: 1.1.24
|
Stable tag: 1.1.25
|
||||||
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.
|
||||||
|
@ -125,6 +125,8 @@ Yes!
|
||||||
1. Altitude & Speed & Hearth rate
|
1. Altitude & Speed & Hearth rate
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
= 1.1.25 =
|
||||||
|
* Added possibility to download your gpx
|
||||||
= 1.1.23 =
|
= 1.1.23 =
|
||||||
* Security fix, please update!
|
* Security fix, please update!
|
||||||
= 1.1.22 =
|
= 1.1.22 =
|
||||||
|
|
|
@ -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.24
|
Version: 1.1.25
|
||||||
Author: Bastianon Massimo
|
Author: Bastianon Massimo
|
||||||
Author URI: http://www.pedemontanadelgrappa.it/
|
Author URI: http://www.pedemontanadelgrappa.it/
|
||||||
License: GPL
|
License: GPL
|
||||||
|
@ -173,7 +173,7 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
|
||||||
|
|
||||||
$gpx = trim($gpx);
|
$gpx = trim($gpx);
|
||||||
|
|
||||||
if (strpos($gpx, "http://") !== 0)
|
if (strpos($gpx, "http://") !== 0 || strpos($gpx, "https://") !== 0)
|
||||||
{
|
{
|
||||||
$gpx = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $gpx);
|
$gpx = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $gpx);
|
||||||
$gpx = $sitePath . $gpx;
|
$gpx = $sitePath . $gpx;
|
||||||
|
@ -348,6 +348,14 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
|
||||||
|
|
||||||
if ($download=='true' && $gpx != '')
|
if ($download=='true' && $gpx != '')
|
||||||
{
|
{
|
||||||
|
if (strpos($gpx, "http://") !== 0 || strpos($gpx, "https://") !== 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$gpx = get_bloginfo('url').$gpx;
|
||||||
|
}
|
||||||
$output.="<a href='$gpx' target='_new'>Download</a>";
|
$output.="<a href='$gpx' target='_new'>Download</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue