* Smaller map type selector

* New map: MapToolKit - Terrain
* Fix: Google maps exception for NextGen Gallery
This commit is contained in:
bastianonm 2013-10-23 13:55:34 +00:00
parent 44e2616175
commit 46c9f67334
4 changed files with 29 additions and 13 deletions

View File

@ -184,6 +184,7 @@ function _wpgpxmaps(params)
mapTypeIds.push("OSM3");
mapTypeIds.push("OSM4");
mapTypeIds.push("OSM5");
mapTypeIds.push("OSM6");
var ngImageMarkers = [];
@ -197,6 +198,7 @@ function _wpgpxmaps(params)
case 'OSM3': { mapType = "OSM3"; break;}
case 'OSM4': { mapType = "OSM4"; break;}
case 'OSM5': { mapType = "OSM5"; break;}
case 'OSM6': { mapType = "OSM6"; break;}
default: { mapType = google.maps.MapTypeId.HYBRID; break;}
}
@ -214,7 +216,8 @@ function _wpgpxmaps(params)
return "http://tile.openstreetmap.org/" + zoom + "/" + coord.x + "/" + coord.y + ".png";
},
tileSize: new google.maps.Size(256, 256),
name: "Open Street Map",
name: "OSM",
alt : "Open Street Map",
maxZoom: 18
}));
@ -223,7 +226,8 @@ function _wpgpxmaps(params)
return "http://a.tile.opencyclemap.org/cycle/" + zoom + "/" + coord.x + "/" + coord.y + ".png";
},
tileSize: new google.maps.Size(256, 256),
name: "Open Cycle Map",
name: "OCM",
alt : "Open Cycle Map",
maxZoom: 18
}));
@ -232,7 +236,8 @@ function _wpgpxmaps(params)
return "http://a.tile2.opencyclemap.org/transport/" + zoom + "/" + coord.x + "/" + coord.y + ".png";
},
tileSize: new google.maps.Size(256, 256),
name: "Open Cycle Map - Transport",
name: "OCM-Tran",
alt : "Open Cycle Map - Transport",
maxZoom: 18
}));
@ -241,16 +246,18 @@ function _wpgpxmaps(params)
return "http://a.tile3.opencyclemap.org/landscape/" + zoom + "/" + coord.x + "/" + coord.y + ".png";
},
tileSize: new google.maps.Size(256, 256),
name: "Open Cycle Map - Landscape",
name: "OCM-Land",
alt : "Open Cycle Map - Landscape",
maxZoom: 18
}));
map.mapTypes.set("OSM3", new google.maps.ImageMapType({
map.mapTypes.set("OSM6", new google.maps.ImageMapType({
getTileUrl: function(coord, zoom) {
return "http://toolserver.org/tiles/hikebike/" + zoom + "/" + coord.x + "/" + coord.y + ".png";
return "http://tile2.maptoolkit.net/terrain/" + zoom + "/" + coord.x + "/" + coord.y + ".png";
},
tileSize: new google.maps.Size(256, 256),
name: "Hike & Bike",
name: "MTK-Terr",
alt : "MapToolKit - Terrain",
maxZoom: 18
}));
@ -360,6 +367,9 @@ function _wpgpxmaps(params)
var img_w = jQuery(this).width();
var img_h = jQuery(this).height();
imageLat = imageLat.replace(",", ".");
imageLon = imageLon.replace(",", ".");
var p = new google.maps.LatLng(imageLat, imageLon);
bounds.extend(p);

View File

@ -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.1
Stable tag: 1.2.2
Draws a gpx track with altitude graph. You can also display your nextgen gallery images in the map.
@ -85,7 +85,7 @@ The attributes are:
1. gheight: graph height
1. mtype: map available types are: HYBRID, ROADMAP, SATELLITE, TERRAIN, OSM1 (Open Street Map), OSM2 (Open Cycle Map), OSM3 (Hike & Bike), OSM4 (Open Cycle Map - Transport), OSM5 (Open Cycle Map - Landscape)
1. mtype: map available types are: HYBRID, ROADMAP, SATELLITE, TERRAIN, OSM1 (Open Street Map), OSM2 (Open Cycle Map), OSM3 (Hike & Bike), OSM4 (Open Cycle Map - Transport), OSM5 (Open Cycle Map - Landscape), OSM6 (MapToolKit - Terrain)
1. waypoints: print the gpx waypoints inside the map (default is FALSE)
@ -176,6 +176,10 @@ Yes!
1. Altitude & Speed & Hearth rate
== Changelog ==
= 1.2.2 =
* Smaller map type selector
* New map: MapToolKit - Terrain
* Fix: Google maps exception for NextGen Gallery
= 1.2.1 =
* Fix: NextGen Gallery 1.9 compatibility
= 1.2.0 =

View File

@ -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.1
Version: 1.2.2
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.1.46");
wp_register_script( 'WP-GPX-Maps', plugins_url('/WP-GPX-Maps.js', __FILE__), array('jquery','googlemaps','highcharts'), "1.2.2");
wp_enqueue_script( 'WP-GPX-Maps' );
}
@ -77,6 +77,7 @@ function print_WP_GPX_Maps_scripts()
.wpgpxmaps_summary .summarylabel { }
.wpgpxmaps_summary .summaryvalue { font-weight: bold; }
.wpgpxmaps .report { line-height:120%; }
.wpgpxmaps .gmnoprint div:first-child { height: 20px; }
</style>
<?php
}

View File

@ -193,6 +193,7 @@
<input type="radio" name="wpgpxmaps_map_type" value="OSM4" <?php if ($t == 'OSM4') echo 'checked'; ?>> Open Cycle Map - Transport<br />
<input type="radio" name="wpgpxmaps_map_type" value="OSM5" <?php if ($t == 'OSM5') echo 'checked'; ?>> Open Cycle Map - Landscape<br />
<input type="radio" name="wpgpxmaps_map_type" value="OSM3" <?php if ($t == 'OSM3') echo 'checked'; ?>> Hike & Bike<br />
<input type="radio" name="wpgpxmaps_map_type" value="OSM6" <?php if ($t == 'OSM6') echo 'checked'; ?>> MapToolKit - Terrain<br />
</td>
</tr>