This commit is contained in:
bastianonm 2012-06-04 12:31:21 +00:00
parent 68b9d8ab1b
commit c9b2d4b6fb
3 changed files with 71 additions and 68 deletions

View File

@ -43,8 +43,6 @@ function setup()
CustomMarker = function( map, latlng, src, img_w, img_h) {
this.latlng_ = latlng;
// Once the LatLng and text are set, add the overlay to the map. This will
// trigger a call to panes_changed which should in turn call draw.
this.setMap(map);
this.src_ = src;
this.img_w_ = img_w;
@ -54,14 +52,17 @@ function setup()
CustomMarker.prototype = new google.maps.OverlayView();
CustomMarker.prototype.draw = function() {
var me = this;
// Check if the el has been created.
var el = this.img_;
if (!el) {
el = this.img_ = document.createElement('img');
el.style.cssText = "border:1px solid #fff;position:absolute;cursor:pointer;margin:0;width:"+(this.img_w_/3)+"px;height:"+(this.img_h_/3)+"px;z-index:1;";
this.img_ = document.createElement('img');
el = this.img_;
el.style.cssText = "width:"+(this.img_w_/3)+"px;height:"+(this.img_h_/3)+"px;";
el.setAttribute("class", "myngimages");
el.setAttribute("lat",this.latlng_.lat());
el.setAttribute("lon",this.latlng_.lng());
el.src=this.src_;
@ -117,8 +118,6 @@ function setup()
}
function _wpgpxmaps(params)
{

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.3
Stable tag: 1.1.20
Stable tag: 1.1.21
License: GPLv2 or later
Draws a gpx track with altitude graph. You can also display your nextgen gallery images in the map.
@ -123,6 +123,9 @@ Yes!
1. Altitude & Speed & Hearth rate
== Changelog ==
= 1.1.21 =
* google maps images fixed (templates with bad css)
* upgrade to google maps 3.9
= 1.1.20 =
* google maps images fixed in <a href="http://wordpress.org/extend/themes/yoko">Yoko theme</a>
= 1.1.19 =

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.20
Version: 1.1.21
Author: Bastianon Massimo
Author URI: http://www.pedemontanadelgrappa.it/
License: GPL
@ -44,8 +44,12 @@ function enqueue_WP_GPX_Maps_scripts()
//wp_enqueue_script( 'jquery' );
wp_deregister_script( 'googleapis' );
wp_register_script( 'googleapis', 'https://maps.googleapis.com/maps/api/js?sensor=false&v=3.9', null, null);
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.15");
wp_register_script( 'WP-GPX-Maps', plugins_url('/WP-GPX-Maps.js', __FILE__), array('jquery'), "1.1.21");
wp_enqueue_script( 'WP-GPX-Maps' );
wp_deregister_script( 'highcharts' );
@ -57,16 +61,13 @@ function enqueue_WP_GPX_Maps_scripts()
function print_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'});
</script>
<style type="text/css">
.wpgpxmaps { clear:both; }
#content .wpgpxmaps img,
.entry-content .wpgpxmaps img,
.wpgpxmaps img { max-width: none; width: none; }
.wpgpxmaps img { max-width: none; width: none; padding:0; background:none; }
.wpgpxmaps .ngimages { display:none; }
.wpgpxmaps .myngimages { border:1px solid #fff;position:absolute;cursor:pointer;margin:0;z-index:1; }
</style>
<?php
}