Version Description
[2012-05-20] = * fixed: some themes set box-shadow on all images, now forceably fixed for Google Maps images * added: option to control whether links on KML maps open in new window
Download this release
Release Info
Developer | webaware |
Plugin | Flexible Map |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
- class.FlxMapPlugin.php +11 -26
- flexible-map.js +7 -4
- flexible-map.min.js +1 -1
- flexible-map.php +1 -5
- instructions.html +3 -0
- readme.txt +9 -2
- styles.css +4 -1
class.FlxMapPlugin.php
CHANGED
@@ -51,26 +51,6 @@ class FlxMapPlugin {
|
|
51 |
}
|
52 |
}
|
53 |
|
54 |
-
/**
|
55 |
-
* activate the plug-in (called by activate event): add custom capabilities, etc.
|
56 |
-
*/
|
57 |
-
public function activate() {
|
58 |
-
// NOP
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* deactivate the plug-in (called by deactivate event): remove custom capabilities, etc.
|
63 |
-
*/
|
64 |
-
public function deactivate() {
|
65 |
-
// remove deprecated custom capabilities for administrator (from previous versions)
|
66 |
-
$role = get_role('administrator');
|
67 |
-
$role->remove_cap('flxmap_options');
|
68 |
-
|
69 |
-
// remove deprecated custom capabilities for editor (from previous versions)
|
70 |
-
$role = get_role('editor');
|
71 |
-
$role->remove_cap('flxmap_options');
|
72 |
-
}
|
73 |
-
|
74 |
/**
|
75 |
* initialise the plugin, called on init action
|
76 |
*/
|
@@ -86,8 +66,8 @@ class FlxMapPlugin {
|
|
86 |
* enqueue any styles we require
|
87 |
*/
|
88 |
public function actionEnqueueStyles() {
|
89 |
-
// theme writers: you can remove by calling wp_dequeue_script('flxmap');
|
90 |
-
wp_enqueue_style('flxmap', "{$this->urlBase}
|
91 |
}
|
92 |
|
93 |
/**
|
@@ -96,11 +76,12 @@ class FlxMapPlugin {
|
|
96 |
public function actionFooter() {
|
97 |
if ($this->loadScripts) {
|
98 |
// load required scripts
|
99 |
-
$url =
|
|
|
100 |
|
101 |
echo <<<HTML
|
102 |
-
<script src="$url/flexible-map.min.js?v=7"></script>
|
103 |
<script src="//maps.google.com/maps/api/js?v=3.8&sensor=false"></script>
|
|
|
104 |
|
105 |
HTML;
|
106 |
|
@@ -108,13 +89,13 @@ HTML;
|
|
108 |
foreach (array_keys($this->locales) as $locale) {
|
109 |
// check for specific locale first, e.g. 'zh-CN'
|
110 |
if (file_exists(FLXMAP_PLUGIN_ROOT . "i18n/$locale.js")) {
|
111 |
-
echo "<script charset='utf-8' src=\"$url
|
112 |
}
|
113 |
else {
|
114 |
// not found, so check for generic locale, e.g. 'zh'
|
115 |
$locale = substr($locale, 0, 2);
|
116 |
if (file_exists(FLXMAP_PLUGIN_ROOT . "i18n/$locale.js")) {
|
117 |
-
echo "<script charset='utf-8' src=\"$url
|
118 |
}
|
119 |
}
|
120 |
}
|
@@ -266,6 +247,10 @@ HTML;
|
|
266 |
|
267 |
// add map based on KML file
|
268 |
else if (isset($attrs['src'])) {
|
|
|
|
|
|
|
|
|
269 |
$kmlfile = self::str2js($attrs['src']);
|
270 |
$html .= " f.showKML(\"$divID\", \"$kmlfile\"";
|
271 |
|
51 |
}
|
52 |
}
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
/**
|
55 |
* initialise the plugin, called on init action
|
56 |
*/
|
66 |
* enqueue any styles we require
|
67 |
*/
|
68 |
public function actionEnqueueStyles() {
|
69 |
+
// theme writers: you can remove this stylesheet by calling wp_dequeue_script('flxmap');
|
70 |
+
wp_enqueue_style('flxmap', "{$this->urlBase}styles.css", FALSE, '2');
|
71 |
}
|
72 |
|
73 |
/**
|
76 |
public function actionFooter() {
|
77 |
if ($this->loadScripts) {
|
78 |
// load required scripts
|
79 |
+
$url = parse_url($this->urlBase, PHP_URL_PATH);
|
80 |
+
$version = 8;
|
81 |
|
82 |
echo <<<HTML
|
|
|
83 |
<script src="//maps.google.com/maps/api/js?v=3.8&sensor=false"></script>
|
84 |
+
<script src="{$url}flexible-map.min.js?v=$version"></script>
|
85 |
|
86 |
HTML;
|
87 |
|
89 |
foreach (array_keys($this->locales) as $locale) {
|
90 |
// check for specific locale first, e.g. 'zh-CN'
|
91 |
if (file_exists(FLXMAP_PLUGIN_ROOT . "i18n/$locale.js")) {
|
92 |
+
echo "<script charset='utf-8' src=\"{$url}i18n/$locale.js?v=$version\"></script>\n";
|
93 |
}
|
94 |
else {
|
95 |
// not found, so check for generic locale, e.g. 'zh'
|
96 |
$locale = substr($locale, 0, 2);
|
97 |
if (file_exists(FLXMAP_PLUGIN_ROOT . "i18n/$locale.js")) {
|
98 |
+
echo "<script charset='utf-8' src=\"{$url}i18n/$locale.js?v=$version\"></script>\n";
|
99 |
}
|
100 |
}
|
101 |
}
|
247 |
|
248 |
// add map based on KML file
|
249 |
else if (isset($attrs['src'])) {
|
250 |
+
if (isset($attrs['targetfix']) && self::isNo($attrs['targetfix'])) {
|
251 |
+
$html .= " f.targetFix = false;\n";
|
252 |
+
}
|
253 |
+
|
254 |
$kmlfile = self::str2js($attrs['src']);
|
255 |
$html .= " f.showKML(\"$divID\", \"$kmlfile\"";
|
256 |
|
flexible-map.js
CHANGED
@@ -21,6 +21,7 @@ function FlexibleMap() {
|
|
21 |
this.markerShowInfo = true; // if have infowin for marker, show it immediately
|
22 |
this.markerDirections = false; // show directions link in info window
|
23 |
this.markerAddress = ''; // address of marker, if given
|
|
|
24 |
this.navigationControlOptions = { style: google.maps.NavigationControlStyle.SMALL };
|
25 |
this.dirService = false;
|
26 |
this.dirPanel = false;
|
@@ -62,7 +63,7 @@ FlexibleMap.prototype = (function() {
|
|
62 |
|
63 |
/**
|
64 |
* set the locale used for i18n phrase lookup, picking the best match
|
65 |
-
* @param {String} localeWanted the locale wanted, e.g. en-AU, da
|
66 |
* @return {String} the locale that will be used (nearest match, or default if none)
|
67 |
*/
|
68 |
setlocale: function(localeWanted) {
|
@@ -119,9 +120,11 @@ FlexibleMap.prototype = (function() {
|
|
119 |
}
|
120 |
|
121 |
// stop links opening in a new window (thanks, Stack Overflow!)
|
122 |
-
|
123 |
-
|
124 |
-
|
|
|
|
|
125 |
},
|
126 |
|
127 |
/**
|
21 |
this.markerShowInfo = true; // if have infowin for marker, show it immediately
|
22 |
this.markerDirections = false; // show directions link in info window
|
23 |
this.markerAddress = ''; // address of marker, if given
|
24 |
+
this.targetFix = true; // remove target="_blank" from links on KML map
|
25 |
this.navigationControlOptions = { style: google.maps.NavigationControlStyle.SMALL };
|
26 |
this.dirService = false;
|
27 |
this.dirPanel = false;
|
63 |
|
64 |
/**
|
65 |
* set the locale used for i18n phrase lookup, picking the best match
|
66 |
+
* @param {String} localeWanted the locale wanted, e.g. en-AU, da-DK, sv
|
67 |
* @return {String} the locale that will be used (nearest match, or default if none)
|
68 |
*/
|
69 |
setlocale: function(localeWanted) {
|
120 |
}
|
121 |
|
122 |
// stop links opening in a new window (thanks, Stack Overflow!)
|
123 |
+
if (this.targetFix) {
|
124 |
+
google.maps.event.addListener(kmlLayer, 'click', function(kmlEvent) {
|
125 |
+
kmlEvent.featureData.description = kmlEvent.featureData.description.replace(/ target="_blank"/ig, "");
|
126 |
+
});
|
127 |
+
}
|
128 |
},
|
129 |
|
130 |
/**
|
flexible-map.min.js
CHANGED
@@ -2,4 +2,4 @@
|
|
2 |
JavaScript for the WordPress plugin wp-flexible-map
|
3 |
copyright (c) 2011-2012 WebAware Pty Ltd, released under LGPL v2.1
|
4 |
*/
|
5 |
-
function FlexibleMap(){this.mapTypeId=google.maps.MapTypeId.ROADMAP;this.mapTypeControl=true;this.scaleControl=false;this.panControl=false;this.zoomControl=true;this.streetViewControl=false;this.scrollwheel=false;this.draggable=true;this.dblclickZoom=true;this.zoom=16;this.markerTitle="";this.markerDescription="";this.markerLink="";this.markerShowInfo=true;this.markerDirections=false;this.markerAddress="";this.navigationControlOptions={style:google.maps.NavigationControlStyle.SMALL};this.dirService=false;this.dirPanel=false;this.region="";this.locale="en";this.localeActive="en"}FlexibleMap.prototype=(function(){var b,a;if(document.addEventListener){b=function(d,c,e){d.addEventListener(c,e,false)};a=function(c){c.stopPropagation();c.preventDefault()}}else{if(document.attachEvent){b=function(c,d,e){c.attachEvent("on"+d,function(){e.call(c,window.event)})};a=function(c){c.cancelBubble=true;c.returnValue=0}}}return{constructor:FlexibleMap,i18n:{en:{"Click for details":"Click for details",Directions:"Directions",From:"From","Get directions":"Get directions"}},setlocale:function(c){this.locale=c;if(c in this.i18n){this.localeActive=c}else{c=c.substr(0,2);if(c in this.i18n){this.localeActive=c}else{this.localeActive="en"}}},gettext:function(d){var c=this.i18n[this.localeActive];if(d in c){return c[d]}return""},showKML:function(c,g,d){var f=this.showMap(c,[0,0]),e=new google.maps.KmlLayer(g);e.setMap(f);if(typeof d!="undefined"){google.maps.event.addListenerOnce(f,"tilesloaded",function(){f.setZoom(d)})}google.maps.event.addListener(e,"click",function(h){h.featureData.description=h.featureData.description.replace(/ target="_blank"/ig,"")})},showMarker:function(f,e,k){var d=this.showMap(f,e),n=new google.maps.Marker({map:d,position:new google.maps.LatLng(k[0],k[1])});if(!this.markerTitle){this.markerTitle=this.markerAddress}if(this.markerTitle){var j,l,p,g,h,m,o=this,c=document.createElement("DIV");c.className="flxmap-infowin";n.setTitle(this.markerTitle);h=document.createElement("DIV");h.className="flxmap-marker-title";h.appendChild(document.createTextNode(this.markerTitle));c.appendChild(h);if(this.markerDescription||this.markerLink){h=document.createElement("DIV");h.className="flxmap-marker-link";if(this.markerDescription){p=this.markerDescription.split("\n");for(j=0,l=p.length;j<l;j++){if(j>0){h.appendChild(document.createElement("BR"))}h.appendChild(document.createTextNode(p[j]))}if(this.markerLink){h.appendChild(document.createElement("BR"))}}if(this.markerLink){m=document.createElement("A");m.href=this.markerLink;m.appendChild(document.createTextNode(this.gettext("Click for details")));h.appendChild(m)}c.appendChild(h)}if(this.markerDirections){h=document.createElement("DIV");h.className="flxmap-directions-link";m=document.createElement("A");m.href="#";m.dataLatitude=k[0];m.dataLongitude=k[1];m.dataTitle=this.markerTitle;b(m,"click",function(i){a(i);o.showDirections(this.dataLatitude,this.dataLongitude,this.dataTitle)});m.appendChild(document.createTextNode(this.gettext("Directions")));h.appendChild(m);c.appendChild(h);if(!this.dirService){this.dirService=new google.maps.DirectionsService()}if(!this.dirPanel){this.dirPanel=new google.maps.DirectionsRenderer({map:d,panel:document.getElementById(this.markerDirections)})}}g=new google.maps.InfoWindow({content:c});if(this.markerShowInfo){g.open(d,n)}google.maps.event.addListener(n,"click",function(){g.open(d,n)})}},showAddress:function(c,d){var e=this,f=new google.maps.Geocoder();this.markerAddress=d;if(this.markerTitle===""){this.markerTitle=d}f.geocode({address:d,region:this.region},function(i,h){if(h==google.maps.GeocoderStatus.OK){var g=i[0].geometry.location,j=[g.lat(),g.lng()];e.showMarker(c,j,j)}else{alert("Map address returns error: "+h)}})},showMap:function(c,d){return new google.maps.Map(document.getElementById(c),{mapTypeId:this.mapTypeId,mapTypeControl:this.mapTypeControl,scaleControl:this.scaleControl,panControl:this.panControl,zoomControl:this.zoomControl,draggable:this.draggable,disableDoubleClickZoom:!this.dblclickZoom,scrollwheel:this.scrollwheel,streetViewControl:this.streetViewControl,navigationControlOptions:this.navigationControlOptions,center:new google.maps.LatLng(d[0],d[1]),zoom:this.zoom})},showDirections:function(g,c,i){var d=document.getElementById(this.markerDirections),f=document.createElement("form"),l=this,h=this.region||"",j,e,k;while(!!(e=d.lastChild)){d.removeChild(e)}e=document.createElement("p");e.appendChild(document.createTextNode(this.gettext("From")+": "));k=document.createElement("input");k.type="text";k.name="from";e.appendChild(k);j=document.createElement("input");j.type="submit";j.value=this.gettext("Get directions");e.appendChild(j);f.appendChild(e);d.appendChild(f);k.focus();if(typeof f.elements.from=="undefined"){f.elements.from=k}b(f,"submit",function(o){a(o);var p=this.elements.from.value;if(/\S/.test(p)){var m=(l.markerAddress==="")?new google.maps.LatLng(g,c):l.markerAddress,n={origin:p,region:h,destination:m,travelMode:google.maps.DirectionsTravelMode.DRIVING};l.dirService.route(n,function(s,q){var r=google.maps.DirectionsStatus;switch(q){case r.OK:l.dirPanel.setDirections(s);break;case r.ZERO_RESULTS:alert("No route could be found between the origin and destination.");break;case r.OVER_QUERY_LIMIT:alert("The webpage has gone over the requests limit in too short a period of time.");break;case r.REQUEST_DENIED:alert("The webpage is not allowed to use the directions service.");break;case r.INVALID_REQUEST:alert("Invalid directions request.");break;case r.NOT_FOUND:alert("Origin or destination was not found.");break;default:alert("A directions request could not be processed due to a server error. The request may succeed if you try again.");break}})}})}}})();
|
2 |
JavaScript for the WordPress plugin wp-flexible-map
|
3 |
copyright (c) 2011-2012 WebAware Pty Ltd, released under LGPL v2.1
|
4 |
*/
|
5 |
+
function FlexibleMap(){this.mapTypeId=google.maps.MapTypeId.ROADMAP;this.mapTypeControl=true;this.scaleControl=false;this.panControl=false;this.zoomControl=true;this.streetViewControl=false;this.scrollwheel=false;this.draggable=true;this.dblclickZoom=true;this.zoom=16;this.markerTitle="";this.markerDescription="";this.markerLink="";this.markerShowInfo=true;this.markerDirections=false;this.markerAddress="";this.targetFix=true;this.navigationControlOptions={style:google.maps.NavigationControlStyle.SMALL};this.dirService=false;this.dirPanel=false;this.region="";this.locale="en";this.localeActive="en"}FlexibleMap.prototype=(function(){var b,a;if(document.addEventListener){b=function(d,c,e){d.addEventListener(c,e,false)};a=function(c){c.stopPropagation();c.preventDefault()}}else{if(document.attachEvent){b=function(c,d,e){c.attachEvent("on"+d,function(){e.call(c,window.event)})};a=function(c){c.cancelBubble=true;c.returnValue=0}}}return{constructor:FlexibleMap,i18n:{en:{"Click for details":"Click for details",Directions:"Directions",From:"From","Get directions":"Get directions"}},setlocale:function(c){this.locale=c;if(c in this.i18n){this.localeActive=c}else{c=c.substr(0,2);if(c in this.i18n){this.localeActive=c}else{this.localeActive="en"}}},gettext:function(d){var c=this.i18n[this.localeActive];if(d in c){return c[d]}return""},showKML:function(c,g,d){var f=this.showMap(c,[0,0]),e=new google.maps.KmlLayer(g);e.setMap(f);if(typeof d!="undefined"){google.maps.event.addListenerOnce(f,"tilesloaded",function(){f.setZoom(d)})}if(this.targetFix){google.maps.event.addListener(e,"click",function(h){h.featureData.description=h.featureData.description.replace(/ target="_blank"/ig,"")})}},showMarker:function(f,e,k){var d=this.showMap(f,e),n=new google.maps.Marker({map:d,position:new google.maps.LatLng(k[0],k[1])});if(!this.markerTitle){this.markerTitle=this.markerAddress}if(this.markerTitle){var j,l,p,g,h,m,o=this,c=document.createElement("DIV");c.className="flxmap-infowin";n.setTitle(this.markerTitle);h=document.createElement("DIV");h.className="flxmap-marker-title";h.appendChild(document.createTextNode(this.markerTitle));c.appendChild(h);if(this.markerDescription||this.markerLink){h=document.createElement("DIV");h.className="flxmap-marker-link";if(this.markerDescription){p=this.markerDescription.split("\n");for(j=0,l=p.length;j<l;j++){if(j>0){h.appendChild(document.createElement("BR"))}h.appendChild(document.createTextNode(p[j]))}if(this.markerLink){h.appendChild(document.createElement("BR"))}}if(this.markerLink){m=document.createElement("A");m.href=this.markerLink;m.appendChild(document.createTextNode(this.gettext("Click for details")));h.appendChild(m)}c.appendChild(h)}if(this.markerDirections){h=document.createElement("DIV");h.className="flxmap-directions-link";m=document.createElement("A");m.href="#";m.dataLatitude=k[0];m.dataLongitude=k[1];m.dataTitle=this.markerTitle;b(m,"click",function(i){a(i);o.showDirections(this.dataLatitude,this.dataLongitude,this.dataTitle)});m.appendChild(document.createTextNode(this.gettext("Directions")));h.appendChild(m);c.appendChild(h);if(!this.dirService){this.dirService=new google.maps.DirectionsService()}if(!this.dirPanel){this.dirPanel=new google.maps.DirectionsRenderer({map:d,panel:document.getElementById(this.markerDirections)})}}g=new google.maps.InfoWindow({content:c});if(this.markerShowInfo){g.open(d,n)}google.maps.event.addListener(n,"click",function(){g.open(d,n)})}},showAddress:function(c,d){var e=this,f=new google.maps.Geocoder();this.markerAddress=d;if(this.markerTitle===""){this.markerTitle=d}f.geocode({address:d,region:this.region},function(i,h){if(h==google.maps.GeocoderStatus.OK){var g=i[0].geometry.location,j=[g.lat(),g.lng()];e.showMarker(c,j,j)}else{alert("Map address returns error: "+h)}})},showMap:function(c,d){return new google.maps.Map(document.getElementById(c),{mapTypeId:this.mapTypeId,mapTypeControl:this.mapTypeControl,scaleControl:this.scaleControl,panControl:this.panControl,zoomControl:this.zoomControl,draggable:this.draggable,disableDoubleClickZoom:!this.dblclickZoom,scrollwheel:this.scrollwheel,streetViewControl:this.streetViewControl,navigationControlOptions:this.navigationControlOptions,center:new google.maps.LatLng(d[0],d[1]),zoom:this.zoom})},showDirections:function(g,c,i){var d=document.getElementById(this.markerDirections),f=document.createElement("form"),l=this,h=this.region||"",j,e,k;while(!!(e=d.lastChild)){d.removeChild(e)}e=document.createElement("p");e.appendChild(document.createTextNode(this.gettext("From")+": "));k=document.createElement("input");k.type="text";k.name="from";e.appendChild(k);j=document.createElement("input");j.type="submit";j.value=this.gettext("Get directions");e.appendChild(j);f.appendChild(e);d.appendChild(f);k.focus();if(typeof f.elements.from=="undefined"){f.elements.from=k}b(f,"submit",function(o){a(o);var p=this.elements.from.value;if(/\S/.test(p)){var m=(l.markerAddress==="")?new google.maps.LatLng(g,c):l.markerAddress,n={origin:p,region:h,destination:m,travelMode:google.maps.DirectionsTravelMode.DRIVING};l.dirService.route(n,function(s,q){var r=google.maps.DirectionsStatus;switch(q){case r.OK:l.dirPanel.setDirections(s);break;case r.ZERO_RESULTS:alert("No route could be found between the origin and destination.");break;case r.OVER_QUERY_LIMIT:alert("The webpage has gone over the requests limit in too short a period of time.");break;case r.REQUEST_DENIED:alert("The webpage is not allowed to use the directions service.");break;case r.INVALID_REQUEST:alert("Invalid directions request.");break;case r.NOT_FOUND:alert("Origin or destination was not found.");break;default:alert("A directions request could not be processed due to a server error. The request may succeed if you try again.");break}})}})}}})();
|
flexible-map.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Flexible Map
|
4 |
Plugin URI: http://snippets.webaware.com.au/wordpress-plugins/wp-flexible-map/
|
5 |
Description: Embed Google Maps in pages and posts, either by centre coodinates or street address, or by URL to a Google Earth KML file.
|
6 |
-
Version: 1.1.
|
7 |
Author: WebAware
|
8 |
Author URI: http://www.webaware.com.au/
|
9 |
*/
|
@@ -55,10 +55,6 @@ spl_autoload_register('flxmap_autoload');
|
|
55 |
// instantiate the plug-in
|
56 |
$FlxMapPlugin = FlxMapPlugin::getInstance();
|
57 |
|
58 |
-
// register plug-in activation / deactivation
|
59 |
-
register_activation_hook(__FILE__, array($FlxMapPlugin, 'activate'));
|
60 |
-
register_deactivation_hook(__FILE__, array($FlxMapPlugin, 'deactivate'));
|
61 |
-
|
62 |
/**
|
63 |
* utility function so themes can easily display the map
|
64 |
* @param array $attrs
|
3 |
Plugin Name: Flexible Map
|
4 |
Plugin URI: http://snippets.webaware.com.au/wordpress-plugins/wp-flexible-map/
|
5 |
Description: Embed Google Maps in pages and posts, either by centre coodinates or street address, or by URL to a Google Earth KML file.
|
6 |
+
Version: 1.1.2
|
7 |
Author: WebAware
|
8 |
Author URI: http://www.webaware.com.au/
|
9 |
*/
|
55 |
// instantiate the plug-in
|
56 |
$FlxMapPlugin = FlxMapPlugin::getInstance();
|
57 |
|
|
|
|
|
|
|
|
|
58 |
/**
|
59 |
* utility function so themes can easily display the map
|
60 |
* @param array $attrs
|
instructions.html
CHANGED
@@ -79,6 +79,9 @@ many different markers all on the one map.</p>
|
|
79 |
<dl class="flxmap-instructions-parameters">
|
80 |
<dt>src</dt>
|
81 |
<dd>URL for KML file to load map details from, e.g. <em>src="http://example.com/map.kml"</em></dd>
|
|
|
|
|
|
|
82 |
<dd><code>[flexiblemap src="http://snippets.webaware.com.au/maps/example-toronto.kml" width="500" height="400"]</code></dd>
|
83 |
</dl>
|
84 |
|
79 |
<dl class="flxmap-instructions-parameters">
|
80 |
<dt>src</dt>
|
81 |
<dd>URL for KML file to load map details from, e.g. <em>src="http://example.com/map.kml"</em></dd>
|
82 |
+
<dt>targetfix</dt>
|
83 |
+
<dd>prevent links from opening in new window, from [true, false], e.g. <em>targetfix="true"</em>; default=true</dd>
|
84 |
+
<dt>Sample:</dt>
|
85 |
<dd><code>[flexiblemap src="http://snippets.webaware.com.au/maps/example-toronto.kml" width="500" height="400"]</code></dd>
|
86 |
</dl>
|
87 |
|
readme.txt
CHANGED
@@ -4,10 +4,12 @@ Plugin Name: WP Flexible Map
|
|
4 |
Plugin URI: http://snippets.webaware.com.au/wordpress-plugins/wp-flexible-map/
|
5 |
Author URI: http://www.webaware.com.au/
|
6 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6ZCY9PST8E4GQ
|
7 |
-
Tags: google, maps, shortcode, kml
|
8 |
Requires at least: 3.0.1
|
9 |
Tested up to: 3.3.2
|
10 |
-
Stable tag: 1.1.
|
|
|
|
|
11 |
|
12 |
Embed Google Maps in pages and posts, either by centre coodinates or street address, or by URL to a Google Earth KML file.
|
13 |
|
@@ -84,6 +86,7 @@ Either the center or the address paramater is required. If you provide both, the
|
|
84 |
= Additional parameters for KML map =
|
85 |
|
86 |
* **src**: the URL for a KML file to load map details from, e.g. *src="http://example.com/map.kml"*
|
|
|
87 |
|
88 |
*Sample*:
|
89 |
`[flexiblemap src="http://snippets.webaware.com.au/maps/example-toronto.kml" width="500" height="400"]`
|
@@ -130,6 +133,10 @@ Since version 1.1.0, this plugin now uses localised messages for things like the
|
|
130 |
|
131 |
== Changelog ==
|
132 |
|
|
|
|
|
|
|
|
|
133 |
= 1.1.1 [2012-04-15] =
|
134 |
* fixed: instructions updated to reflect recent changes
|
135 |
|
4 |
Plugin URI: http://snippets.webaware.com.au/wordpress-plugins/wp-flexible-map/
|
5 |
Author URI: http://www.webaware.com.au/
|
6 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6ZCY9PST8E4GQ
|
7 |
+
Tags: google, maps, google maps, shortcode, kml
|
8 |
Requires at least: 3.0.1
|
9 |
Tested up to: 3.3.2
|
10 |
+
Stable tag: 1.1.2
|
11 |
+
License: GPLv2 or later
|
12 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
14 |
Embed Google Maps in pages and posts, either by centre coodinates or street address, or by URL to a Google Earth KML file.
|
15 |
|
86 |
= Additional parameters for KML map =
|
87 |
|
88 |
* **src**: the URL for a KML file to load map details from, e.g. *src="http://example.com/map.kml"*
|
89 |
+
* **targetfix**: prevent links from opening in new window, from [true, false], e.g. *targetfix="true"*; default=true
|
90 |
|
91 |
*Sample*:
|
92 |
`[flexiblemap src="http://snippets.webaware.com.au/maps/example-toronto.kml" width="500" height="400"]`
|
133 |
|
134 |
== Changelog ==
|
135 |
|
136 |
+
= 1.1.2 [2012-05-20] =
|
137 |
+
* fixed: some themes set box-shadow on all images, now forceably fixed for Google Maps images
|
138 |
+
* added: option to control whether links on KML maps open in new window
|
139 |
+
|
140 |
= 1.1.1 [2012-04-15] =
|
141 |
* fixed: instructions updated to reflect recent changes
|
142 |
|
styles.css
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
/* stop some themes from messing up Google Maps' styling (e.g. twentyeleven) */
|
2 |
|
3 |
.flxmap-container img {
|
4 |
-
max-width: none;
|
|
|
|
|
|
|
5 |
}
|
6 |
|
7 |
/* some basic styling for info window */
|
1 |
/* stop some themes from messing up Google Maps' styling (e.g. twentyeleven) */
|
2 |
|
3 |
.flxmap-container img {
|
4 |
+
max-width: none !important;
|
5 |
+
-webkit-box-shadow: none !important;
|
6 |
+
-moz-box-shadow: none !important;
|
7 |
+
box-shadow: none !important;
|
8 |
}
|
9 |
|
10 |
/* some basic styling for info window */
|