diff --git a/WP-GPX-Maps.js b/WP-GPX-Maps.js index 3a0432a..8b772f9 100644 --- a/WP-GPX-Maps.js +++ b/WP-GPX-Maps.js @@ -1128,8 +1128,6 @@ function getItemFromArray(arr,index) } - - function getClosestIndex(points,lat,lon) { var dd=10000; @@ -1158,6 +1156,10 @@ function getClosestImage(lat,lon,targetId) for (var i = 0; i < img_spans.length; i++) { var imageLat = img_spans[i].getAttribute("lat"); var imageLon = img_spans[i].getAttribute("lon"); + + imageLat = imageLat.replace(",", "."); + imageLon = imageLon.replace(",", "."); + var d = dist(imageLat, imageLon, lat, lon); if ( d < dd ) { diff --git a/readme.txt b/readme.txt index 693c68f..b09c832 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i 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 Tested up to: 3.6.1 -Stable tag: 1.2.2 +Stable tag: 1.2.3 Draws a gpx track with altitude graph. You can also display your nextgen gallery images in the map. diff --git a/wp-gpx-maps.php b/wp-gpx-maps.php index eb4fb36..2e685f1 100644 --- a/wp-gpx-maps.php +++ b/wp-gpx-maps.php @@ -3,7 +3,7 @@ Plugin Name: WP-GPX-Maps Plugin URI: http://www.devfarm.it/ Description: Draws a gpx track with altitude graph -Version: 1.2.2 +Version: 1.2.3 Author: Bastianon Massimo Author URI: http://www.pedemontanadelgrappa.it/ */ @@ -59,7 +59,7 @@ function enqueue_WP_GPX_Maps_scripts() 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.2.2"); + wp_register_script( 'WP-GPX-Maps', plugins_url('/WP-GPX-Maps.js', __FILE__), array('jquery','googlemaps','highcharts'), "1.2.3"); wp_enqueue_script( 'WP-GPX-Maps' ); }