@@ -16,8 +16,8 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | |
| 18 | 18 | if (!defined('DOKU_INC')) die(); |
| 19 | -if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); |
|
| 20 | -require_once (DOKU_PLUGIN . 'action.php'); |
|
| 19 | +if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC.'lib/plugins/'); |
|
| 20 | +require_once (DOKU_PLUGIN.'action.php'); |
|
| 21 | 21 | /** |
| 22 | 22 | * Plugin OL Maps: Allow Display of a OpenLayers Map in a wiki page. |
| 23 | 23 | * Toolbar button. |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * @param $controller DokuWiki's event controller object. Also available as global $EVENT_HANDLER |
| 32 | 32 | */ |
| 33 | 33 | function register(Doku_Event_Handler $controller) { |
| 34 | - $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ()); |
|
| 34 | + $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array()); |
|
| 35 | 35 | $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'insertCSSSniffer'); |
| 36 | 36 | } |
| 37 | 37 | |
@@ -40,15 +40,15 @@ discard block |
||
| 40 | 40 | * @param Doku_Event $event the DokuWiki event |
| 41 | 41 | */ |
| 42 | 42 | function insert_button(Doku_Event $event, $param) { |
| 43 | - $strOpen ='<olmap id="olMapOne" width="550px" height="450px" lat="50.0" '; |
|
| 44 | - $strOpen.='lon="5.1" zoom="12" statusbar="1" controls="1" poihoverstyle="0" '; |
|
| 45 | - $strOpen.='baselyr="OpenStreetMap" gpxfile="" kmlfile="" geojsonfile="" summary="" >\n'; |
|
| 46 | - $strOpen.='~~ Plugin olmap help.\n'; |
|
| 47 | - $strOpen.='~~ Required in the above tag are values for: id (unique on this page), width, heigth.\n'; |
|
| 48 | - $strOpen.='~~ Also you will want to enter zoomlevel and lat, lon values that make sense for where you want the map to start.\n\n'; |
|
| 49 | - $strOpen.='~~ Below is an example of a POI, you can add as many as you want. '; |
|
| 50 | - $strOpen.='~~ More examples: http://dokuwiki.org/plugin:openlayersmap \n'; |
|
| 51 | - $event->data[] = array ( |
|
| 43 | + $strOpen = '<olmap id="olMapOne" width="550px" height="450px" lat="50.0" '; |
|
| 44 | + $strOpen .= 'lon="5.1" zoom="12" statusbar="1" controls="1" poihoverstyle="0" '; |
|
| 45 | + $strOpen .= 'baselyr="OpenStreetMap" gpxfile="" kmlfile="" geojsonfile="" summary="" >\n'; |
|
| 46 | + $strOpen .= '~~ Plugin olmap help.\n'; |
|
| 47 | + $strOpen .= '~~ Required in the above tag are values for: id (unique on this page), width, heigth.\n'; |
|
| 48 | + $strOpen .= '~~ Also you will want to enter zoomlevel and lat, lon values that make sense for where you want the map to start.\n\n'; |
|
| 49 | + $strOpen .= '~~ Below is an example of a POI, you can add as many as you want. '; |
|
| 50 | + $strOpen .= '~~ More examples: http://dokuwiki.org/plugin:openlayersmap \n'; |
|
| 51 | + $event->data[] = array( |
|
| 52 | 52 | 'type' => 'format', |
| 53 | 53 | 'title' => $this->getLang('openlayersmap'), |
| 54 | 54 | 'icon' => '../../plugins/openlayersmap/toolbar/map.png', |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | /** add a snippet of javascript into the head to do a css operation we can check for lateron.*/ |
| 61 | 61 | function insertCSSSniffer(Doku_Event $event, $param) { |
| 62 | - $event->data["script"][] = array ( |
|
| 62 | + $event->data["script"][] = array( |
|
| 63 | 63 | "type" => "text/javascript", |
| 64 | 64 | "_data" => "document.documentElement.className += ' olCSSsupported';", |
| 65 | 65 | ); |
@@ -15,8 +15,12 @@ |
||
| 15 | 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 | 16 | */ |
| 17 | 17 | |
| 18 | -if (!defined('DOKU_INC')) die(); |
|
| 19 | -if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); |
|
| 18 | +if (!defined('DOKU_INC')) { |
|
| 19 | + die(); |
|
| 20 | +} |
|
| 21 | +if (!defined('DOKU_PLUGIN')) { |
|
| 22 | + define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); |
|
| 23 | +} |
|
| 20 | 24 | require_once (DOKU_PLUGIN . 'action.php'); |
| 21 | 25 | /** |
| 22 | 26 | * Plugin OL Maps: Allow Display of a OpenLayers Map in a wiki page. |
@@ -21,73 +21,73 @@ |
||
| 21 | 21 | * @author Mark C. Prins |
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | -$meta['enableOSM'] = array ( |
|
| 24 | +$meta['enableOSM'] = array( |
|
| 25 | 25 | 'onoff' |
| 26 | 26 | ); |
| 27 | -$meta['enableStamen'] = array ( |
|
| 27 | +$meta['enableStamen'] = array( |
|
| 28 | 28 | 'onoff' |
| 29 | 29 | ); |
| 30 | -$meta['enableGoogle'] = array ( |
|
| 30 | +$meta['enableGoogle'] = array( |
|
| 31 | 31 | 'onoff' |
| 32 | 32 | ); |
| 33 | -$meta['googleAPIkey'] = array ( |
|
| 33 | +$meta['googleAPIkey'] = array( |
|
| 34 | 34 | 'string' |
| 35 | 35 | ); |
| 36 | -$meta['enableBing'] = array ( |
|
| 36 | +$meta['enableBing'] = array( |
|
| 37 | 37 | 'onoff' |
| 38 | 38 | ); |
| 39 | -$meta['bingAPIKey'] = array ( |
|
| 39 | +$meta['bingAPIKey'] = array( |
|
| 40 | 40 | 'string' |
| 41 | 41 | ); |
| 42 | -$meta['tfApiKey'] = array ( |
|
| 42 | +$meta['tfApiKey'] = array( |
|
| 43 | 43 | 'string' |
| 44 | 44 | ); |
| 45 | -$meta['iconUrlOverload'] = array ( |
|
| 45 | +$meta['iconUrlOverload'] = array( |
|
| 46 | 46 | 'string' |
| 47 | 47 | ); |
| 48 | -$meta['enableA11y'] = array ( |
|
| 48 | +$meta['enableA11y'] = array( |
|
| 49 | 49 | 'onoff' |
| 50 | 50 | ); |
| 51 | -$meta['optionStaticMapGenerator'] = array ( |
|
| 51 | +$meta['optionStaticMapGenerator'] = array( |
|
| 52 | 52 | 'multichoice', '_choices' => array('local', 'remote') |
| 53 | 53 | ); |
| 54 | -$meta['autoZoomMap'] = array ( |
|
| 54 | +$meta['autoZoomMap'] = array( |
|
| 55 | 55 | 'onoff' |
| 56 | 56 | ); |
| 57 | -$meta ['displayformat'] = array ( |
|
| 58 | - 'multichoice', '_choices' => array ('DD', 'DMS') |
|
| 57 | +$meta ['displayformat'] = array( |
|
| 58 | + 'multichoice', '_choices' => array('DD', 'DMS') |
|
| 59 | 59 | ); |
| 60 | 60 | |
| 61 | -$meta ['default_width'] = array ( |
|
| 61 | +$meta ['default_width'] = array( |
|
| 62 | 62 | 'string' |
| 63 | 63 | ); |
| 64 | -$meta ['default_height'] = array ( |
|
| 64 | +$meta ['default_height'] = array( |
|
| 65 | 65 | 'string' |
| 66 | 66 | ); |
| 67 | -$meta ['default_zoom'] = array ( |
|
| 67 | +$meta ['default_zoom'] = array( |
|
| 68 | 68 | 'string' |
| 69 | 69 | ); |
| 70 | -$meta ['default_autozoom'] = array ( |
|
| 70 | +$meta ['default_autozoom'] = array( |
|
| 71 | 71 | 'onoff' |
| 72 | 72 | ); |
| 73 | -$meta ['default_statusbar'] = array ( |
|
| 73 | +$meta ['default_statusbar'] = array( |
|
| 74 | 74 | 'onoff' |
| 75 | 75 | ); |
| 76 | -$meta ['default_toolbar'] = array ( |
|
| 76 | +$meta ['default_toolbar'] = array( |
|
| 77 | 77 | 'onoff' |
| 78 | 78 | ); |
| 79 | -$meta ['default_controls'] = array ( |
|
| 79 | +$meta ['default_controls'] = array( |
|
| 80 | 80 | 'onoff' |
| 81 | 81 | ); |
| 82 | -$meta ['default_poihoverstyle'] = array ( |
|
| 82 | +$meta ['default_poihoverstyle'] = array( |
|
| 83 | 83 | 'onoff' |
| 84 | 84 | ); |
| 85 | -$meta ['default_kmlfile'] = array ( |
|
| 85 | +$meta ['default_kmlfile'] = array( |
|
| 86 | 86 | 'string' |
| 87 | 87 | ); |
| 88 | -$meta ['default_gpxfile'] = array ( |
|
| 88 | +$meta ['default_gpxfile'] = array( |
|
| 89 | 89 | 'string' |
| 90 | 90 | ); |
| 91 | -$meta ['default_geojsonfile'] = array ( |
|
| 91 | +$meta ['default_geojsonfile'] = array( |
|
| 92 | 92 | 'string' |
| 93 | 93 | ); |