This commit is contained in:
parent
68b9d8ab1b
commit
c9b2d4b6fb
|
@ -43,8 +43,6 @@ function setup()
|
||||||
CustomMarker = function( map, latlng, src, img_w, img_h) {
|
CustomMarker = function( map, latlng, src, img_w, img_h) {
|
||||||
this.latlng_ = latlng;
|
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.setMap(map);
|
||||||
this.src_ = src;
|
this.src_ = src;
|
||||||
this.img_w_ = img_w;
|
this.img_w_ = img_w;
|
||||||
|
@ -54,20 +52,23 @@ function setup()
|
||||||
CustomMarker.prototype = new google.maps.OverlayView();
|
CustomMarker.prototype = new google.maps.OverlayView();
|
||||||
|
|
||||||
CustomMarker.prototype.draw = function() {
|
CustomMarker.prototype.draw = function() {
|
||||||
|
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
// Check if the el has been created.
|
// Check if the el has been created.
|
||||||
var el = this.img_;
|
var el = this.img_;
|
||||||
if (!el) {
|
if (!el) {
|
||||||
|
|
||||||
el = this.img_ = document.createElement('img');
|
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;";
|
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("lat",this.latlng_.lat());
|
||||||
el.setAttribute("lon",this.latlng_.lng());
|
el.setAttribute("lon",this.latlng_.lng());
|
||||||
el.src=this.src_;
|
el.src=this.src_;
|
||||||
|
|
||||||
google.maps.event.addDomListener(el, "click", function(event) {
|
google.maps.event.addDomListener(el, "click", function(event) {
|
||||||
google.maps.event.trigger(me, "click",el);
|
google.maps.event.trigger(me, "click", el);
|
||||||
});
|
});
|
||||||
|
|
||||||
google.maps.event.addDomListener(el, "mouseover", function(event) {
|
google.maps.event.addDomListener(el, "mouseover", function(event) {
|
||||||
|
@ -117,8 +118,6 @@ function setup()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function _wpgpxmaps(params)
|
function _wpgpxmaps(params)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -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
|
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.3
|
||||||
Stable tag: 1.1.20
|
Stable tag: 1.1.21
|
||||||
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.
|
||||||
|
@ -123,6 +123,9 @@ Yes!
|
||||||
1. Altitude & Speed & Hearth rate
|
1. Altitude & Speed & Hearth rate
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
= 1.1.21 =
|
||||||
|
* google maps images fixed (templates with bad css)
|
||||||
|
* upgrade to google maps 3.9
|
||||||
= 1.1.20 =
|
= 1.1.20 =
|
||||||
* google maps images fixed in <a href="http://wordpress.org/extend/themes/yoko">Yoko theme</a>
|
* google maps images fixed in <a href="http://wordpress.org/extend/themes/yoko">Yoko theme</a>
|
||||||
= 1.1.19 =
|
= 1.1.19 =
|
||||||
|
|
|
@ -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.20
|
Version: 1.1.21
|
||||||
Author: Bastianon Massimo
|
Author: Bastianon Massimo
|
||||||
Author URI: http://www.pedemontanadelgrappa.it/
|
Author URI: http://www.pedemontanadelgrappa.it/
|
||||||
License: GPL
|
License: GPL
|
||||||
|
@ -44,8 +44,12 @@ function enqueue_WP_GPX_Maps_scripts()
|
||||||
|
|
||||||
//wp_enqueue_script( 'jquery' );
|
//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_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_enqueue_script( 'WP-GPX-Maps' );
|
||||||
|
|
||||||
wp_deregister_script( 'highcharts' );
|
wp_deregister_script( 'highcharts' );
|
||||||
|
@ -57,17 +61,14 @@ function enqueue_WP_GPX_Maps_scripts()
|
||||||
function print_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>
|
<style type="text/css">
|
||||||
<script type='text/javascript'>
|
|
||||||
google.load("maps", "3", {other_params: 'sensor=false'});
|
|
||||||
</script>
|
|
||||||
<style type="text/css">
|
|
||||||
.wpgpxmaps { clear:both; }
|
.wpgpxmaps { clear:both; }
|
||||||
#content .wpgpxmaps img,
|
#content .wpgpxmaps img,
|
||||||
.entry-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 .ngimages { display:none; }
|
||||||
</style>
|
.wpgpxmaps .myngimages { border:1px solid #fff;position:absolute;cursor:pointer;margin:0;z-index:1; }
|
||||||
|
</style>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue