Version Description
[2012-04-15] = * added: locale-specific messages (using translations from Google Translate) e.g. Directions link * wanted: translators to help me add new translations, and clean up the messages I got from Google Translate! * fixed: use region to help refine street address searches
Download this release
Release Info
Developer | webaware |
Plugin | Flexible Map |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.6 to 1.1.0
- class.FlxMapAdmin.php +4 -1
- class.FlxMapPlugin.php +44 -3
- flexible-map.js +59 -6
- flexible-map.min.js +1 -1
- flexible-map.php +1 -1
- i18n/af.js +13 -0
- i18n/ar.js +13 -0
- i18n/az.js +13 -0
- i18n/bg.js +13 -0
- i18n/bs.js +13 -0
- i18n/ca.js +13 -0
- i18n/cs.js +13 -0
- i18n/da.js +13 -0
- i18n/de.js +13 -0
- i18n/el.js +13 -0
- i18n/eo.js +13 -0
- i18n/es.js +13 -0
- i18n/et.js +13 -0
- i18n/fa.js +13 -0
- i18n/fi.js +13 -0
- i18n/fr.js +13 -0
- i18n/gl.js +13 -0
- i18n/he.js +13 -0
- i18n/hi.js +13 -0
- i18n/hr.js +13 -0
- i18n/hu.js +13 -0
- i18n/hy.js +13 -0
- i18n/id.js +13 -0
- i18n/is.js +13 -0
- i18n/it.js +13 -0
- i18n/ja.js +13 -0
- i18n/ko.js +13 -0
- i18n/lt.js +13 -0
- i18n/lv.js +13 -0
- i18n/mk.js +13 -0
- i18n/ms.js +13 -0
- i18n/nl.js +13 -0
- i18n/no.js +13 -0
- i18n/pl.js +13 -0
- i18n/pt.js +13 -0
- i18n/ro.js +13 -0
- i18n/ru.js +13 -0
- i18n/sk.js +13 -0
- i18n/sl.js +13 -0
- i18n/sq.js +13 -0
- i18n/sr.js +13 -0
- i18n/sv.js +13 -0
- i18n/ta.js +13 -0
- i18n/th.js +13 -0
- i18n/tr.js +13 -0
- i18n/uk.js +13 -0
- i18n/vi.js +13 -0
- i18n/zh.js +13 -0
- readme.txt +14 -2
class.FlxMapAdmin.php
CHANGED
@@ -41,8 +41,11 @@ class FlxMapAdmin {
|
|
41 |
*/
|
42 |
public function addPluginDetailsLinks($links, $file) {
|
43 |
// add settings link
|
44 |
-
if ($file == FLXMAP_PLUGIN_NAME)
|
45 |
$links[] = '<a href="admin.php?page=' . self::MENU_PAGE . '-instructions">' . __('Instructions') . '</a>';
|
|
|
|
|
|
|
46 |
|
47 |
return $links;
|
48 |
}
|
41 |
*/
|
42 |
public function addPluginDetailsLinks($links, $file) {
|
43 |
// add settings link
|
44 |
+
if ($file == FLXMAP_PLUGIN_NAME) {
|
45 |
$links[] = '<a href="admin.php?page=' . self::MENU_PAGE . '-instructions">' . __('Instructions') . '</a>';
|
46 |
+
$links[] = '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6ZCY9PST8E4GQ" title="Please consider making a donation to help support maintenance and further development of this plugin.">'
|
47 |
+
. __('Donate') . '</a>';
|
48 |
+
}
|
49 |
|
50 |
return $links;
|
51 |
}
|
class.FlxMapPlugin.php
CHANGED
@@ -6,6 +6,8 @@ class FlxMapPlugin {
|
|
6 |
public $urlBase; // string: base URL path to files in plugin
|
7 |
|
8 |
private $loadScripts = FALSE; // true when scripts should be loaded
|
|
|
|
|
9 |
|
10 |
/**
|
11 |
* static method for getting the instance of this singleton object
|
@@ -30,6 +32,8 @@ class FlxMapPlugin {
|
|
30 |
// record plugin URL base
|
31 |
$this->urlBase = plugin_dir_url(__FILE__);
|
32 |
|
|
|
|
|
33 |
if (is_admin()) {
|
34 |
// kick off the admin handling
|
35 |
new FlxMapAdmin($this);
|
@@ -40,10 +44,10 @@ class FlxMapPlugin {
|
|
40 |
|
41 |
// non-admin actions and filters for this plugin
|
42 |
add_action('wp_footer', array($this, 'actionFooter'));
|
|
|
43 |
|
44 |
// custom actions and filters for this plugin
|
45 |
add_filter('flexmap_getmap', array($this, 'shortcodeMap'), 10, 1);
|
46 |
-
add_action('wp_print_styles', array($this, 'actionEnqueueStyles'));
|
47 |
}
|
48 |
}
|
49 |
|
@@ -67,6 +71,17 @@ class FlxMapPlugin {
|
|
67 |
$role->remove_cap('flxmap_options');
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
/**
|
71 |
* enqueue any styles we require
|
72 |
*/
|
@@ -81,12 +96,28 @@ class FlxMapPlugin {
|
|
81 |
public function actionFooter() {
|
82 |
if ($this->loadScripts) {
|
83 |
// load required scripts
|
84 |
-
$url = parse_url($this->urlBase, PHP_URL_PATH);
|
|
|
85 |
echo <<<HTML
|
86 |
-
<script src="$url/flexible-map.min.js?v=
|
87 |
<script src="//maps.google.com/maps/api/js?v=3.8&sensor=false"></script>
|
88 |
|
89 |
HTML;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
}
|
92 |
|
@@ -178,6 +209,16 @@ HTML;
|
|
178 |
$html .= " f.region = \"{$attrs['region']}\";\n";
|
179 |
}
|
180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
// add map based on coordinates, with optional marker coordinates
|
182 |
if (isset($attrs['center']) && self::isCoordinates($attrs['center'])) {
|
183 |
$marker = $attrs['center'];
|
6 |
public $urlBase; // string: base URL path to files in plugin
|
7 |
|
8 |
private $loadScripts = FALSE; // true when scripts should be loaded
|
9 |
+
private $locales; // hash map of locales required for i18n
|
10 |
+
private $locale;
|
11 |
|
12 |
/**
|
13 |
* static method for getting the instance of this singleton object
|
32 |
// record plugin URL base
|
33 |
$this->urlBase = plugin_dir_url(__FILE__);
|
34 |
|
35 |
+
add_action('init', array($this, 'actionInit'));
|
36 |
+
|
37 |
if (is_admin()) {
|
38 |
// kick off the admin handling
|
39 |
new FlxMapAdmin($this);
|
44 |
|
45 |
// non-admin actions and filters for this plugin
|
46 |
add_action('wp_footer', array($this, 'actionFooter'));
|
47 |
+
add_action('wp_print_styles', array($this, 'actionEnqueueStyles'));
|
48 |
|
49 |
// custom actions and filters for this plugin
|
50 |
add_filter('flexmap_getmap', array($this, 'shortcodeMap'), 10, 1);
|
|
|
51 |
}
|
52 |
}
|
53 |
|
71 |
$role->remove_cap('flxmap_options');
|
72 |
}
|
73 |
|
74 |
+
/**
|
75 |
+
* initialise the plugin, called on init action
|
76 |
+
*/
|
77 |
+
public function actionInit() {
|
78 |
+
// start off required locales with this website's WP locale
|
79 |
+
$this->locales = array();
|
80 |
+
$this->locale = get_locale();
|
81 |
+
if ($this->locale != '' && $this->locale != 'en_US')
|
82 |
+
$this->locales[str_replace('_', '-', $this->locale)] = 1;
|
83 |
+
}
|
84 |
+
|
85 |
/**
|
86 |
* enqueue any styles we require
|
87 |
*/
|
96 |
public function actionFooter() {
|
97 |
if ($this->loadScripts) {
|
98 |
// load required scripts
|
99 |
+
$url = rtrim(parse_url($this->urlBase, PHP_URL_PATH), '/');
|
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 |
+
|
107 |
+
// see if we need to load i18n messages
|
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/i18n/$locale.js\"></script>\n";
|
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/i18n/$locale.js\"></script>\n";
|
118 |
+
}
|
119 |
+
}
|
120 |
+
}
|
121 |
}
|
122 |
}
|
123 |
|
209 |
$html .= " f.region = \"{$attrs['region']}\";\n";
|
210 |
}
|
211 |
|
212 |
+
if (isset($attrs['locale'])) {
|
213 |
+
$html .= " f.setlocale(\"{$attrs['locale']}\");\n";
|
214 |
+
$this->locales[$attrs['locale']] = 1;
|
215 |
+
}
|
216 |
+
else if ($this->locale != '' || $this->locale != 'en-US') {
|
217 |
+
$locale = str_replace('_', '-', $this->locale);
|
218 |
+
$html .= " f.setlocale(\"$locale\");\n";
|
219 |
+
$this->locales[$locale] = 1;
|
220 |
+
}
|
221 |
+
|
222 |
// add map based on coordinates, with optional marker coordinates
|
223 |
if (isset($attrs['center']) && self::isCoordinates($attrs['center'])) {
|
224 |
$marker = $attrs['center'];
|
flexible-map.js
CHANGED
@@ -24,7 +24,9 @@ function FlexibleMap() {
|
|
24 |
this.navigationControlOptions = { style: google.maps.NavigationControlStyle.SMALL };
|
25 |
this.dirService = false;
|
26 |
this.dirPanel = false;
|
27 |
-
this.region =
|
|
|
|
|
28 |
}
|
29 |
|
30 |
FlexibleMap.prototype = (function() {
|
@@ -46,6 +48,57 @@ FlexibleMap.prototype = (function() {
|
|
46 |
return {
|
47 |
constructor: FlexibleMap,
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
/**
|
50 |
* show a map based on a KML file
|
51 |
* @param {String} divID the ID of the div that will contain the map
|
@@ -120,7 +173,7 @@ FlexibleMap.prototype = (function() {
|
|
120 |
if (this.markerLink) {
|
121 |
a = document.createElement("A");
|
122 |
a.href = this.markerLink;
|
123 |
-
a.appendChild(document.createTextNode("Click for details"));
|
124 |
element.appendChild(a);
|
125 |
}
|
126 |
container.appendChild(element);
|
@@ -139,7 +192,7 @@ FlexibleMap.prototype = (function() {
|
|
139 |
stopEvent(event);
|
140 |
self.showDirections(this.dataLatitude, this.dataLongitude, this.dataTitle);
|
141 |
});
|
142 |
-
a.appendChild(document.createTextNode("Directions"));
|
143 |
element.appendChild(a);
|
144 |
container.appendChild(element);
|
145 |
|
@@ -178,7 +231,7 @@ FlexibleMap.prototype = (function() {
|
|
178 |
if (this.markerTitle === "")
|
179 |
this.markerTitle = address;
|
180 |
|
181 |
-
geocoder.geocode({address: address}, function(results, status) {
|
182 |
if (status == google.maps.GeocoderStatus.OK) {
|
183 |
var location = results[0].geometry.location,
|
184 |
centre = [ location.lat(), location.lng() ];
|
@@ -232,14 +285,14 @@ FlexibleMap.prototype = (function() {
|
|
232 |
|
233 |
// populate form and add to panel
|
234 |
p = document.createElement("p");
|
235 |
-
p.appendChild(document.createTextNode("From: "));
|
236 |
from = document.createElement("input");
|
237 |
from.type = "text";
|
238 |
from.name = "from";
|
239 |
p.appendChild(from);
|
240 |
input = document.createElement("input");
|
241 |
input.type = "submit";
|
242 |
-
input.value = "Get directions";
|
243 |
p.appendChild(input);
|
244 |
form.appendChild(p);
|
245 |
panel.appendChild(form);
|
24 |
this.navigationControlOptions = { style: google.maps.NavigationControlStyle.SMALL };
|
25 |
this.dirService = false;
|
26 |
this.dirPanel = false;
|
27 |
+
this.region = '';
|
28 |
+
this.locale = 'en';
|
29 |
+
this.localeActive = 'en';
|
30 |
}
|
31 |
|
32 |
FlexibleMap.prototype = (function() {
|
48 |
return {
|
49 |
constructor: FlexibleMap,
|
50 |
|
51 |
+
/**
|
52 |
+
* collection of locale / phrase mapping for internationalisation of messages
|
53 |
+
*/
|
54 |
+
i18n: {
|
55 |
+
"en": {
|
56 |
+
"Click for details" : "Click for details",
|
57 |
+
"Directions" : "Directions",
|
58 |
+
"From" : "From",
|
59 |
+
"Get directions" : "Get directions"
|
60 |
+
}
|
61 |
+
},
|
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.DK
|
66 |
+
* @return {String} the locale that will be used (nearest match, or default if none)
|
67 |
+
*/
|
68 |
+
setlocale: function(localeWanted) {
|
69 |
+
this.locale = localeWanted;
|
70 |
+
|
71 |
+
// attempt to set this locale as active
|
72 |
+
if (localeWanted in this.i18n) {
|
73 |
+
this.localeActive = localeWanted;
|
74 |
+
}
|
75 |
+
else {
|
76 |
+
// not found, so try simplified locale
|
77 |
+
localeWanted = localeWanted.substr(0, 2);
|
78 |
+
if (localeWanted in this.i18n) {
|
79 |
+
this.localeActive = localeWanted;
|
80 |
+
}
|
81 |
+
else {
|
82 |
+
// still not found, use default (en)
|
83 |
+
this.localeActive = "en";
|
84 |
+
}
|
85 |
+
}
|
86 |
+
},
|
87 |
+
|
88 |
+
/**
|
89 |
+
* get phrase from the current locale domain, or the default domain (en) if not found
|
90 |
+
* @param {String} key the key for the desired phrase
|
91 |
+
* @return {String}
|
92 |
+
*/
|
93 |
+
gettext: function(key) {
|
94 |
+
var phrases = this.i18n[this.localeActive];
|
95 |
+
|
96 |
+
if (key in phrases)
|
97 |
+
return phrases[key];
|
98 |
+
|
99 |
+
return "";
|
100 |
+
},
|
101 |
+
|
102 |
/**
|
103 |
* show a map based on a KML file
|
104 |
* @param {String} divID the ID of the div that will contain the map
|
173 |
if (this.markerLink) {
|
174 |
a = document.createElement("A");
|
175 |
a.href = this.markerLink;
|
176 |
+
a.appendChild(document.createTextNode(this.gettext("Click for details")));
|
177 |
element.appendChild(a);
|
178 |
}
|
179 |
container.appendChild(element);
|
192 |
stopEvent(event);
|
193 |
self.showDirections(this.dataLatitude, this.dataLongitude, this.dataTitle);
|
194 |
});
|
195 |
+
a.appendChild(document.createTextNode(this.gettext("Directions")));
|
196 |
element.appendChild(a);
|
197 |
container.appendChild(element);
|
198 |
|
231 |
if (this.markerTitle === "")
|
232 |
this.markerTitle = address;
|
233 |
|
234 |
+
geocoder.geocode({address: address, region: this.region}, function(results, status) {
|
235 |
if (status == google.maps.GeocoderStatus.OK) {
|
236 |
var location = results[0].geometry.location,
|
237 |
centre = [ location.lat(), location.lng() ];
|
285 |
|
286 |
// populate form and add to panel
|
287 |
p = document.createElement("p");
|
288 |
+
p.appendChild(document.createTextNode(this.gettext("From") + ": "));
|
289 |
from = document.createElement("input");
|
290 |
from.type = "text";
|
291 |
from.name = "from";
|
292 |
p.appendChild(from);
|
293 |
input = document.createElement("input");
|
294 |
input.type = "submit";
|
295 |
+
input.value = this.gettext("Get directions");
|
296 |
p.appendChild(input);
|
297 |
form.appendChild(p);
|
298 |
panel.appendChild(form);
|
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=
|
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}})}})}}})();
|
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.0
|
7 |
Author: WebAware
|
8 |
Author URI: http://www.webaware.com.au/
|
9 |
*/
|
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.0
|
7 |
Author: WebAware
|
8 |
Author URI: http://www.webaware.com.au/
|
9 |
*/
|
i18n/af.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Afrikaans
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["af"] = {
|
7 |
+
"Click for details" : "Klik vir meer inligting",
|
8 |
+
"Directions" : "padkaart",
|
9 |
+
"From" : "Plek van vertrek",
|
10 |
+
"Get directions" : "Kry padkaart"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/ar.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Arabic
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["ar"] = {
|
7 |
+
"Click for details" : "فوق لمزيد من التفاصيل",
|
8 |
+
"Directions" : "اتجاهات",
|
9 |
+
"From" : "مكان المغادرة",
|
10 |
+
"Get directions" : "الحصول على الاتجاهات"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/az.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Azerbaijani
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["az"] = {
|
7 |
+
"Click for details" : "Detaylar üçün tıklayınız",
|
8 |
+
"Directions" : "istiqamətləri",
|
9 |
+
"From" : "Gediş yeri",
|
10 |
+
"Get directions" : "istiqamətləri almaq"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/bg.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Bulgarian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["bg"] = {
|
7 |
+
"Click for details" : "Кликнете за повече информация",
|
8 |
+
"Directions" : "Карта на посоки",
|
9 |
+
"From" : "Място на тръгване",
|
10 |
+
"Get directions" : "Получаване на карта посоки"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/bs.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Bosnian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["bs"] = {
|
7 |
+
"Click for details" : "Кликнете за повече информация",
|
8 |
+
"Directions" : "Карта на посоки",
|
9 |
+
"From" : "Място на тръгване",
|
10 |
+
"Get directions" : "Получаване на карта посоки"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/ca.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Catalan
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["ca"] = {
|
7 |
+
"Click for details" : "Feu clic per a més detalls",
|
8 |
+
"Directions" : "mapa Direccions",
|
9 |
+
"From" : "Lloc de sortida",
|
10 |
+
"Get directions" : "Obtenir adreces mapa"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/cs.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Czech
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["cs"] = {
|
7 |
+
"Click for details" : "Klikněte pro detail",
|
8 |
+
"Directions" : "Mapa směry",
|
9 |
+
"From" : "Místo odletu",
|
10 |
+
"Get directions" : "Získat mapu trasy"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/da.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Danish
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["da"] = {
|
7 |
+
"Click for details" : "Klik for detaljer",
|
8 |
+
"Directions" : "Kørselsvejledning",
|
9 |
+
"From" : "Afgangssted",
|
10 |
+
"Get directions" : "Hent kørselsvejledning"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/de.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// German
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["de"] = {
|
7 |
+
"Click for details" : "Klicken für Detail",
|
8 |
+
"Directions" : "Wegbeschreibung",
|
9 |
+
"From" : "Abfahrtsort",
|
10 |
+
"Get directions" : "Wegbeschreibung anzeigen"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/el.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Greek
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["el"] = {
|
7 |
+
"Click for details" : "Κάντε κλικ για λεπτομέρειες",
|
8 |
+
"Directions" : "κατευθύνσεις Χάρτης",
|
9 |
+
"From" : "Τόπος αναχώρησης",
|
10 |
+
"Get directions" : "Πάρτε κατευθύνσεις χάρτη"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/eo.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Esperanto
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["eo"] = {
|
7 |
+
"Click for details" : "Klaku por detaloj",
|
8 |
+
"Directions" : "direktoj",
|
9 |
+
"From" : "Loko de partio",
|
10 |
+
"Get directions" : "Get direktoj"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/es.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Spanish
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["es"] = {
|
7 |
+
"Click for details" : "Haga clic para más detalles",
|
8 |
+
"Directions" : "Instrucciones",
|
9 |
+
"From" : "Lugar de salida",
|
10 |
+
"Get directions" : "Obtener direcciones"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/et.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Estonian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["et"] = {
|
7 |
+
"Click for details" : "Vaata lähemalt",
|
8 |
+
"Directions" : "Kaart suunas",
|
9 |
+
"From" : "Lähtekoht",
|
10 |
+
"Get directions" : "Võta kaart suunas"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/fa.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Farsi/Persian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["fa"] = {
|
7 |
+
"Click for details" : "برای جزئیات کلیک کنید",
|
8 |
+
"Directions" : "جهت نقشه",
|
9 |
+
"From" : "محل عزیمت",
|
10 |
+
"Get directions" : "جهت نقشه"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/fi.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Finnish
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["fi"] = {
|
7 |
+
"Click for details" : "Klikkaa lisätietoja",
|
8 |
+
"Directions" : "Kartta suuntiin",
|
9 |
+
"From" : "Lähtöpaikka",
|
10 |
+
"Get directions" : "Hanki kartta ohjeet"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/fr.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// French
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["fr"] = {
|
7 |
+
"Click for details" : "Cliquez pour plus de détails",
|
8 |
+
"Directions" : "Itinéraire",
|
9 |
+
"From" : "Lieu de départ",
|
10 |
+
"Get directions" : "Itinéraire"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/gl.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Galician
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["gl"] = {
|
7 |
+
"Click for details" : "Preme aquí para detalles",
|
8 |
+
"Directions" : "direccións Mapa",
|
9 |
+
"From" : "Lugar de partida",
|
10 |
+
"Get directions" : "obter direccións"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/he.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Hebrew
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["he"] = {
|
7 |
+
"Click for details" : "לחץ לפרטים נוספים",
|
8 |
+
"Directions" : "כיוונים",
|
9 |
+
"From" : "מקום יציאה",
|
10 |
+
"Get directions" : "קבל הוראות"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/hi.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Hindi
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["hi"] = {
|
7 |
+
"Click for details" : "जानकारी के लिए क्लिक करें",
|
8 |
+
"Directions" : "नक्शा दिशाओं",
|
9 |
+
"From" : "प्रस्थान के प्लेस",
|
10 |
+
"Get directions" : "नक्शा दिशाओं"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/hr.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Croatian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["hr"] = {
|
7 |
+
"Click for details" : "Kliknite za detalje",
|
8 |
+
"Directions" : "Smjerovi",
|
9 |
+
"From" : "Mjesto polaska",
|
10 |
+
"Get directions" : "Nabavite karte smjerove"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/hu.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Hungarian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["hu"] = {
|
7 |
+
"Click for details" : "Kattintson a részletekért",
|
8 |
+
"Directions" : "Térkép irányban",
|
9 |
+
"From" : "Indulás helye",
|
10 |
+
"Get directions" : "Térkép irányban"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/hy.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Armenian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["hy"] = {
|
7 |
+
"Click for details" : "Նոր մանրամասներ",
|
8 |
+
"Directions" : "Քարտեզ ուղղություններն",
|
9 |
+
"From" : "Հայը մեկնելը",
|
10 |
+
"Get directions" : "ստանալ ուղղությունները"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/id.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Indonesian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["id"] = {
|
7 |
+
"Click for details" : "Klik untuk rincian",
|
8 |
+
"Directions" : "Arah",
|
9 |
+
"From" : "Tempat keberangkatan",
|
10 |
+
"Get directions" : "Dapatkan arah"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/is.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Icelandic
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["is"] = {
|
7 |
+
"Click for details" : "Smelltu til að fá upplýsingar",
|
8 |
+
"Directions" : "leiðbeiningar",
|
9 |
+
"From" : "Brottfararstaður",
|
10 |
+
"Get directions" : "fá leiðbeiningar"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/it.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Italian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["it"] = {
|
7 |
+
"Click for details" : "Clicca per i dettagli",
|
8 |
+
"Directions" : "Indicazioni",
|
9 |
+
"From" : "Luogo di partenza",
|
10 |
+
"Get directions" : "Ottieni indicazioni stradali"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/ja.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Japanese
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["ja"] = {
|
7 |
+
"Click for details" : "詳細はこちらをクリック",
|
8 |
+
"Directions" : "マップの方向性",
|
9 |
+
"From" : "出発地",
|
10 |
+
"Get directions" : "地図の方向を得る"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/ko.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Korean
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["ko"] = {
|
7 |
+
"Click for details" : "자세한 내용을 보려면 클릭하세요",
|
8 |
+
"Directions" : "지도 방향",
|
9 |
+
"From" : "출발 장소",
|
10 |
+
"Get directions" : "지도 길찾기"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/lt.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Lithuanian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["lt"] = {
|
7 |
+
"Click for details" : "Click for details",
|
8 |
+
"Directions" : "Medis kryptys",
|
9 |
+
"From" : "Išvykimo vieta",
|
10 |
+
"Get directions" : "Gauti žemėlapio kryptis"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/lv.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Latvian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["lv"] = {
|
7 |
+
"Click for details" : "Noklikšķiniet uz detaļām",
|
8 |
+
"Directions" : "virzieni",
|
9 |
+
"From" : "Atiešanas vieta",
|
10 |
+
"Get directions" : "Saņemt kartes virzienus"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/mk.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Macedonian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["mk"] = {
|
7 |
+
"Click for details" : "Кликни за повеќе детали",
|
8 |
+
"Directions" : "насоки",
|
9 |
+
"From" : "Местото на поаѓање",
|
10 |
+
"Get directions" : "добијат насоки"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/ms.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Malaysian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["mk"] = {
|
7 |
+
"Click for details" : "Klik untuk maklumat lanjut",
|
8 |
+
"Directions" : "arahan",
|
9 |
+
"From" : "Tempat berlepas",
|
10 |
+
"Get directions" : "Dapatkan arah"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/nl.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Dutch
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["nl"] = {
|
7 |
+
"Click for details" : "Klik hier voor details",
|
8 |
+
"Directions" : "kaart Routebeschrijving",
|
9 |
+
"From" : "Plaats van vertrek",
|
10 |
+
"Get directions" : "Get kaart Routebeschrijving"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/no.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Norwegian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["no"] = {
|
7 |
+
"Click for details" : "Klikk for detaljer",
|
8 |
+
"Directions" : "kartanvisninger",
|
9 |
+
"From" : "Avgangssted",
|
10 |
+
"Get directions" : "Få kartanvisninger"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/pl.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Polish
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["pl"] = {
|
7 |
+
"Click for details" : "Kliknij po szczegóły",
|
8 |
+
"Directions" : "Dojazd",
|
9 |
+
"From" : "Miejsce wyjazdu",
|
10 |
+
"Get directions" : "Pobierz Dojazd"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/pt.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Portugese
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["pt"] = {
|
7 |
+
"Click for details" : "Clique para detalhes",
|
8 |
+
"Directions" : "direções Mapa",
|
9 |
+
"From" : "Local de partida",
|
10 |
+
"Get directions" : "Obter direcções mapa"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/ro.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Romanian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["ro"] = {
|
7 |
+
"Click for details" : "Click pentru detalii",
|
8 |
+
"Directions" : "direcţii",
|
9 |
+
"From" : "Locul de plecare",
|
10 |
+
"Get directions" : "Obţineţi indicaţii"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/ru.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Russian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["ru"] = {
|
7 |
+
"Click for details" : "Нажмите для подробностей",
|
8 |
+
"Directions" : "Карта проезда",
|
9 |
+
"From" : "Место отправления",
|
10 |
+
"Get directions" : "Получить карту направления"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/sk.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Slovak
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["sk"] = {
|
7 |
+
"Click for details" : "Kliknite pre detail",
|
8 |
+
"Directions" : "Mapa smermi",
|
9 |
+
"From" : "Miesto odletu",
|
10 |
+
"Get directions" : "Získať mapu trasy"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/sl.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Slovenian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["sl"] = {
|
7 |
+
"Click for details" : "Kliknite za podrobnosti",
|
8 |
+
"Directions" : "smeri",
|
9 |
+
"From" : "Kraj odhoda",
|
10 |
+
"Get directions" : "Pridobite zemljevid navodila"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/sq.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Albanian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["sq"] = {
|
7 |
+
"Click for details" : "Kliko për detaje",
|
8 |
+
"Directions" : "drejtimet",
|
9 |
+
"From" : "Vendi i nisjes",
|
10 |
+
"Get directions" : "Merr drejtime"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/sr.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Serbian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["sr"] = {
|
7 |
+
"Click for details" : "Кликните за детаље",
|
8 |
+
"Directions" : "Правци",
|
9 |
+
"From" : "Место поласка",
|
10 |
+
"Get directions" : "Упутства за вожњу"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/sv.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Swedish
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["sv"] = {
|
7 |
+
"Click for details" : "Klicka för mer information",
|
8 |
+
"Directions" : "Karta håll",
|
9 |
+
"From" : "Plats för avresa",
|
10 |
+
"Get directions" : "Hämta vägbeskrivning"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/ta.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Tamil
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["ta"] = {
|
7 |
+
"Click for details" : "விவரங்களுக்கு சொடுக்கவும்",
|
8 |
+
"Directions" : "வரைபடத்தை திசைகளில்",
|
9 |
+
"From" : "புறப்படும் இடம்",
|
10 |
+
"Get directions" : "திசைகளை பெறவும்"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/th.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Thai
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["th"] = {
|
7 |
+
"Click for details" : "คลิกที่นี่เพื่อดูรายละเอียด",
|
8 |
+
"Directions" : "เส้นทางแผนที่",
|
9 |
+
"From" : "สถานที่ออกเดินทาง",
|
10 |
+
"Get directions" : "ขอเส้นทางแผนที่"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/tr.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Turkish
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["tr"] = {
|
7 |
+
"Click for details" : "Detaylar için tıklayın",
|
8 |
+
"Directions" : "harita tarifi",
|
9 |
+
"From" : "Kalkış Yeri",
|
10 |
+
"Get directions" : "Harita tarifi alın"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/uk.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Ukrainian
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["uk"] = {
|
7 |
+
"Click for details" : "Натисніть для подробиць",
|
8 |
+
"Directions" : "проїзд",
|
9 |
+
"From" : "Місце відправлення",
|
10 |
+
"Get directions" : "Отримати карту напрямки"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/vi.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Vietnamese
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["vi"] = {
|
7 |
+
"Click for details" : "Nhấn vào đây để biết thêm chi tiết",
|
8 |
+
"Directions" : "hướng dẫn",
|
9 |
+
"From" : "Nơi khởi hành",
|
10 |
+
"Get directions" : "nhận được hướng dẫn"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
i18n/zh.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Chinese
|
2 |
+
// from Google Translate -- please help improve this translation
|
3 |
+
|
4 |
+
if (typeof FlexibleMap != "undefined") {
|
5 |
+
|
6 |
+
FlexibleMap.prototype.i18n["zh"] = {
|
7 |
+
"Click for details" : "點擊查看詳情",
|
8 |
+
"Directions" : "方向",
|
9 |
+
"From" : "出發地點",
|
10 |
+
"Get directions" : "獲取路線"
|
11 |
+
};
|
12 |
+
|
13 |
+
}
|
readme.txt
CHANGED
@@ -3,10 +3,11 @@ Contributors: webaware
|
|
3 |
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 |
Tags: google, maps, shortcode, kml
|
7 |
Requires at least: 3.0.1
|
8 |
Tested up to: 3.3.1
|
9 |
-
Stable tag: 1.0
|
10 |
|
11 |
Embed Google Maps in pages and posts, either by centre coodinates or street address, or by URL to a Google Earth KML file.
|
12 |
|
@@ -71,6 +72,8 @@ Either the center or the address paramater is required. If you provide both, the
|
|
71 |
* **description**: a description of the marker location (can have HTML links), e.g. *description="Lorem ipsum dolor sit amet"*
|
72 |
* **directions**: show directions link in text bubble; by default, directions will be displayed underneath map, but you can specify the element ID for directions here.
|
73 |
* **showinfo**: show the marker's info window when the map loads, from [true, false], e.g. *showinfo="true"*; default=true
|
|
|
|
|
74 |
|
75 |
*Samples*:
|
76 |
`[flexiblemap center="-34.916721,138.828878" width="500" height="400" zoom="9" title="Adelaide Hills" description="The Adelaide Hills are repleat with wineries."]
|
@@ -115,14 +118,23 @@ Google Maps API caches the KML file, so it often won't get your new changes. To
|
|
115 |
|
116 |
= Why won't the map show my place when I use the address parameter? =
|
117 |
|
118 |
-
When you use a street address instead of centre coordinates, you are effectively searching Google Maps for your location. Try being very specific about your address, including your town / city, state / province, and country to make sure Google can find where you mean. If the marker is still in the wrong place, you might need to specify the location using centre coordinates instead.
|
119 |
|
120 |
= How can I use centre coordinates for the map and have directions to my address? =
|
121 |
|
122 |
When you use just centre coordinates for your map, the directions may send people to the location *opposite* your location! Yes, I know... anyway, if you specify both the centre coordinates and the street address, the map will be centred correctly and the directions will be to your address.
|
123 |
|
|
|
|
|
|
|
|
|
124 |
== Changelog ==
|
125 |
|
|
|
|
|
|
|
|
|
|
|
126 |
= 1.0.6 [2012-04-06] =
|
127 |
* fixed: use plugin_dir_url() to get url base, and protocol-relative url to load Google Maps API (SSL compatible)
|
128 |
|
3 |
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.1
|
10 |
+
Stable tag: 1.1.0
|
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 |
|
72 |
* **description**: a description of the marker location (can have HTML links), e.g. *description="Lorem ipsum dolor sit amet"*
|
73 |
* **directions**: show directions link in text bubble; by default, directions will be displayed underneath map, but you can specify the element ID for directions here.
|
74 |
* **showinfo**: show the marker's info window when the map loads, from [true, false], e.g. *showinfo="true"*; default=true
|
75 |
+
* **locale**: use a specific locale (language) for messages like the text of the Directions link, e.g. *locale="nl-BE"*
|
76 |
+
* **region**: specify region to help localise address searches for street address map and directions, taken from the list of [ccTLD](http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains) (without the .), e.g. *region="au"*
|
77 |
|
78 |
*Samples*:
|
79 |
`[flexiblemap center="-34.916721,138.828878" width="500" height="400" zoom="9" title="Adelaide Hills" description="The Adelaide Hills are repleat with wineries."]
|
118 |
|
119 |
= Why won't the map show my place when I use the address parameter? =
|
120 |
|
121 |
+
When you use a street address instead of centre coordinates, you are effectively searching Google Maps for your location. Try being very specific about your address, including your town / city, state / province, and country to make sure Google can find where you mean. You can also specify your region with the `region` parameter to help Google Maps refine its search. If the marker is still in the wrong place, you might need to specify the location using centre coordinates instead.
|
122 |
|
123 |
= How can I use centre coordinates for the map and have directions to my address? =
|
124 |
|
125 |
When you use just centre coordinates for your map, the directions may send people to the location *opposite* your location! Yes, I know... anyway, if you specify both the centre coordinates and the street address, the map will be centred correctly and the directions will be to your address.
|
126 |
|
127 |
+
= How do I get the maps to use my language? =
|
128 |
+
|
129 |
+
Since version 1.1.0, this plugin now uses localised messages for things like the Directions link and the default message on links in info windows. If you have your [WordPress installation set to use your language](http://codex.wordpress.org/WordPress_in_Your_Language), the plugin should automatically pick it up. If you need to force it to pick up your language (or want to offer a different language), use the `locale` parameter, e.g. `locale="ru"` or `locale="zh-TW"`. Google Maps will use the locale information from your web browser to help display maps in your language (see your browser's language settings).
|
130 |
+
|
131 |
== Changelog ==
|
132 |
|
133 |
+
= 1.1.0 [2012-04-15] =
|
134 |
+
* added: locale-specific messages (using translations from Google Translate) e.g. Directions link
|
135 |
+
* wanted: translators to help me add new translations, and clean up the messages I got from Google Translate!
|
136 |
+
* fixed: use region to help refine street address searches
|
137 |
+
|
138 |
= 1.0.6 [2012-04-06] =
|
139 |
* fixed: use plugin_dir_url() to get url base, and protocol-relative url to load Google Maps API (SSL compatible)
|
140 |
|