Version Description
[2012-04-06] = * fixed: use plugin_dir_url() to get url base, and protocol-relative url to load Google Maps API (SSL compatible)
Download this release
Release Info
Developer | webaware |
Plugin | Flexible Map |
Version | 1.0.6 |
Comparing to | |
See all releases |
Code changes from version 1.0.5 to 1.0.6
- class.FlxMapPlugin.php +3 -6
- flexible-map.php +1 -1
- readme.txt +9 -6
class.FlxMapPlugin.php
CHANGED
@@ -5,7 +5,6 @@
|
|
5 |
class FlxMapPlugin {
|
6 |
public $urlBase; // string: base URL path to files in plugin
|
7 |
|
8 |
-
private $admin; // handle to admin object if running in wp-admin
|
9 |
private $loadScripts = FALSE; // true when scripts should be loaded
|
10 |
|
11 |
/**
|
@@ -29,13 +28,11 @@ class FlxMapPlugin {
|
|
29 |
*/
|
30 |
private function __construct() {
|
31 |
// record plugin URL base
|
32 |
-
$this->urlBase =
|
33 |
-
if (!empty($_SERVER['HTTPS']))
|
34 |
-
$this->urlBase = preg_replace('@^http:@', 'https:', $this->urlBase);
|
35 |
|
36 |
if (is_admin()) {
|
37 |
// kick off the admin handling
|
38 |
-
|
39 |
}
|
40 |
else {
|
41 |
// add shortcodes
|
@@ -87,7 +84,7 @@ class FlxMapPlugin {
|
|
87 |
$url = parse_url($this->urlBase, PHP_URL_PATH);
|
88 |
echo <<<HTML
|
89 |
<script src="$url/flexible-map.min.js?v=6"></script>
|
90 |
-
<script src="
|
91 |
|
92 |
HTML;
|
93 |
}
|
5 |
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 |
/**
|
28 |
*/
|
29 |
private function __construct() {
|
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);
|
36 |
}
|
37 |
else {
|
38 |
// add shortcodes
|
84 |
$url = parse_url($this->urlBase, PHP_URL_PATH);
|
85 |
echo <<<HTML
|
86 |
<script src="$url/flexible-map.min.js?v=6"></script>
|
87 |
+
<script src="//maps.google.com/maps/api/js?v=3.8&sensor=false"></script>
|
88 |
|
89 |
HTML;
|
90 |
}
|
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.0.6
|
7 |
Author: WebAware
|
8 |
Author URI: http://www.webaware.com.au/
|
9 |
*/
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ 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 |
|
@@ -107,7 +107,11 @@ There is a PHP function `flexmap_show_map()` for theme and plugin developers. Al
|
|
107 |
|
108 |
= Can I add multiple markers to a map? =
|
109 |
|
110 |
-
Using a KML file, you can have as many markers on a map as you like, with as much detail in the info windows. With KML you can also change marker icons and add other nice features. You can
|
|
|
|
|
|
|
|
|
111 |
|
112 |
= Why won't the map show my place when I use the address parameter? =
|
113 |
|
@@ -117,12 +121,11 @@ When you use a street address instead of centre coordinates, you are effectively
|
|
117 |
|
118 |
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.
|
119 |
|
120 |
-
= Why won't my KML map update when I edit the KML file? =
|
121 |
-
|
122 |
-
Google Maps API caches the KML file, so it often won't get your new changes. To force a change, append a URL query parameter with a number and increment the number each time your change the KML file. A nice simple and commonly used parameter name is v (for version), like this: .../my-map.kml?v=2
|
123 |
-
|
124 |
== Changelog ==
|
125 |
|
|
|
|
|
|
|
126 |
= 1.0.5 [2012-03-17] =
|
127 |
* fixed: CSS fixes for themes that muck up Google Maps images (e.g. twentyeleven)
|
128 |
* added: infowindow styles now in enqueued stylesheet
|
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.6
|
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 |
|
107 |
|
108 |
= Can I add multiple markers to a map? =
|
109 |
|
110 |
+
Using a KML file, you can have as many markers on a map as you like, with as much detail in the info windows. With KML you can also change marker icons and add other nice features. You can generate your KML file from an application like Google Earth, or you can create it yourself (in a text editor or with your own programming). [Learn more about KML](https://developers.google.com/kml/).
|
111 |
+
|
112 |
+
= Why won't my KML map update when I edit the KML file? =
|
113 |
+
|
114 |
+
Google Maps API caches the KML file, so it often won't get your new changes. To force a change, append a URL query parameter with a number and increment the number each time you change the KML file. A nice simple and commonly used parameter name is v (for version), like this: .../my-map.kml?v=2
|
115 |
|
116 |
= Why won't the map show my place when I use the address parameter? =
|
117 |
|
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 |
+
|
129 |
= 1.0.5 [2012-03-17] =
|
130 |
* fixed: CSS fixes for themes that muck up Google Maps images (e.g. twentyeleven)
|
131 |
* added: infowindow styles now in enqueued stylesheet
|