This commit is contained in:
parent
5720ab8d00
commit
4f574f03b7
|
@ -9,7 +9,31 @@ var loc_it =
|
|||
"altitude": "Altitudine"
|
||||
};
|
||||
var loc = loc_en;
|
||||
|
||||
function sleep(ms)
|
||||
{
|
||||
var dt = new Date();
|
||||
dt.setTime(dt.getTime() + ms);
|
||||
while (new Date().getTime() < dt.getTime());
|
||||
}
|
||||
|
||||
function wpgpxmaps(targhetId,mapType,mapData,graphData)
|
||||
{
|
||||
var i = 0;
|
||||
while ((google == undefined || google.maps == undefined || google.visualization == undefined))
|
||||
{
|
||||
sleep(100);
|
||||
i++;
|
||||
if (i== 100)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
_wpgpxmaps(targhetId,mapType,mapData,graphData);
|
||||
}
|
||||
|
||||
|
||||
function _wpgpxmaps(targhetId,mapType,mapData,graphData)
|
||||
{
|
||||
var el = document.getElementById("wpgpxmaps_" + targhetId);
|
||||
var el_map = document.getElementById("map_" + targhetId);
|
||||
|
|
|
@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=basti
|
|||
Tags: maps, gpx, gps, graph, google maps, google chart
|
||||
Requires at least: 2.0.0
|
||||
Tested up to: 3.3
|
||||
Stable tag: 1.0.4
|
||||
Stable tag: 1.0.5
|
||||
License: GPLv2 or later
|
||||
|
||||
Draws a gpx track with altitude graph
|
||||
|
@ -66,6 +66,8 @@ Yes!
|
|||
2. Screenshot Admin area
|
||||
|
||||
== Changelog ==
|
||||
= 1.0.5 =
|
||||
* Fixed javscript errors with slow javascript loading
|
||||
= 1.0.4 =
|
||||
* Fixed Upload file error
|
||||
* Added support for Garmin gpx (http://www.garmin.com/xmlschemas/GpxExtensions/v3 namespace)
|
||||
|
@ -80,6 +82,7 @@ Yes!
|
|||
* Initial release.
|
||||
|
||||
== Upgrade Notice ==
|
||||
= 1.0.5 =
|
||||
= 1.0.4 =
|
||||
= 1.0.3 =
|
||||
= 1.0.2 =
|
||||
|
|
|
@ -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.0.4
|
||||
Version: 1.0.5
|
||||
Author: Bastianon Massimo
|
||||
Author URI: http://www.pedemontanadelgrappa.it/
|
||||
License: GPL
|
||||
|
@ -36,18 +36,20 @@ function WP_GPX_Maps_action_links($links, $file) {
|
|||
return $links;
|
||||
}
|
||||
|
||||
|
||||
function enqueue_WP_GPX_Maps_scripts()
|
||||
{
|
||||
?>
|
||||
<script type='text/javascript' src='https://www.google.com/jsapi?ver=3.2.1'></script>
|
||||
<script type='text/javascript'>
|
||||
google.load('maps', '3', {other_params: 'sensor=false'});
|
||||
google.load('visualization', '1', {'packages':['corechart']});
|
||||
google.load("maps", "3", {other_params: 'sensor=false'});
|
||||
</script>
|
||||
<script type='text/javascript' src='<?php echo plugins_url('/WP-GPX-Maps.js', __FILE__) ?>'></script>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
|
||||
{
|
||||
$gpx = $attr["gpx"];
|
||||
|
@ -100,11 +102,12 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='')
|
|||
<div id="chart_'.$r.'" class="plot" style="width:'.$w.'; height:'.$gh.'"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
var m_'.$r.' = ['.$points_maps.'];
|
||||
var c_'.$r.' = ['.$points_graph.'];
|
||||
wpgpxmaps("'.$r.'",\''.$mt.'\',m_'.$r.',c_'.$r.');
|
||||
});
|
||||
|
||||
wpgpxmaps("'.$r.'","'.$mt.'",m_'.$r.',c_'.$r.');
|
||||
|
||||
</script>';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue