@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | public function getMenuIcon(): string |
40 | 40 | { |
41 | 41 | $plugin = $this->getPluginName(); |
42 | - return DOKU_PLUGIN . $plugin . '/admin/purge.svg'; |
|
42 | + return DOKU_PLUGIN.$plugin.'/admin/purge.svg'; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -53,13 +53,13 @@ discard block |
||
53 | 53 | return; |
54 | 54 | } |
55 | 55 | if (isset($_REQUEST['purgetiles'])) { |
56 | - $path = $conf['cachedir'] . '/olmaptiles'; |
|
56 | + $path = $conf['cachedir'].'/olmaptiles'; |
|
57 | 57 | if ($this->rrmdir($path)) { |
58 | 58 | msg($this->getLang('admin_purged_tiles'), 0); |
59 | 59 | } |
60 | 60 | } |
61 | 61 | if (isset($_REQUEST['purgemaps'])) { |
62 | - $path = $conf['mediadir'] . '/olmapmaps'; |
|
62 | + $path = $conf['mediadir'].'/olmapmaps'; |
|
63 | 63 | if ($this->rrmdir($path)) { |
64 | 64 | msg($this->getLang('admin_purged_maps'), 0); |
65 | 65 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | '<input id="purgetiles" name="purgetiles" type="checkbox" value="1" class="checkbox" />' |
107 | 107 | ); |
108 | 108 | $form->addElement( |
109 | - '<label for="purgetiles" class="label">' . $this->getLang('admin_purge_tiles') |
|
109 | + '<label for="purgetiles" class="label">'.$this->getLang('admin_purge_tiles') |
|
110 | 110 | . '</label>' |
111 | 111 | ); |
112 | 112 | $form->addElement('</p>'); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $form->addElement('<p>'); |
117 | 117 | $form->addElement('<input id="purgemaps" name="purgemaps" type="checkbox" value="1" class="checkbox" />'); |
118 | 118 | $form->addElement( |
119 | - '<label for="purgemaps" class="label">' . $this->getLang('admin_purge_maps') . '</label>' |
|
119 | + '<label for="purgemaps" class="label">'.$this->getLang('admin_purge_maps').'</label>' |
|
120 | 120 | ); |
121 | 121 | $form->addElement('</p>'); |
122 | 122 | $form->endFieldset(); |
@@ -607,8 +607,9 @@ |
||
607 | 607 | . "%2C" . $bbox ['maxlon']; |
608 | 608 | $imgUrl .= "&dcl=1"; |
609 | 609 | } |
610 | - if (strpos($imgUrl, "?") === false) |
|
611 | - $imgUrl .= "?"; |
|
610 | + if (strpos($imgUrl, "?") === false) { |
|
611 | + $imgUrl .= "?"; |
|
612 | + } |
|
612 | 613 | |
613 | 614 | //$imgUrl .= "&ms=" . str_replace ( "px", "", $gmap ['width'] ) . "," |
614 | 615 | // . str_replace ( "px", "", $gmap ['height'] ); |
@@ -124,7 +124,7 @@ |
||
124 | 124 | $_nocache = true; |
125 | 125 | $imgUrl .= $this->getBing($gmap, $overlay) . "&.png"; |
126 | 126 | } |
127 | - /* elseif (stripos ( $gmap ['baselyr'], 'mapquest' ) !== false) { |
|
127 | + /* elseif (stripos ( $gmap ['baselyr'], 'mapquest' ) !== false) { |
|
128 | 128 | // MapQuest |
129 | 129 | if (! $this->getConf ( 'mapquestAPIKey' )) { |
130 | 130 | // no API key for MapQuest, use OSM |
@@ -115,14 +115,14 @@ discard block |
||
115 | 115 | if (!$this->getConf('bingAPIKey')) { |
116 | 116 | // in case there is no Bing api key we'll use OSM |
117 | 117 | $_firstimageID = $this->getStaticOSM($gmap, $overlay); |
118 | - $imgUrl .= $_firstimageID; |
|
118 | + $imgUrl .= $_firstimageID; |
|
119 | 119 | if ($this->getConf('optionStaticMapGenerator') == 'remote') { |
120 | 120 | $imgUrl .= "&.png"; |
121 | 121 | } |
122 | 122 | } else { |
123 | 123 | // seems that Bing doesn't like the DW client, turn off caching |
124 | 124 | $_nocache = true; |
125 | - $imgUrl .= $this->getBing($gmap, $overlay) . "&.png"; |
|
125 | + $imgUrl .= $this->getBing($gmap, $overlay)."&.png"; |
|
126 | 126 | } |
127 | 127 | /* elseif (stripos ( $gmap ['baselyr'], 'mapquest' ) !== false) { |
128 | 128 | // MapQuest |
@@ -141,14 +141,14 @@ discard block |
||
141 | 141 | } else { |
142 | 142 | // default OSM |
143 | 143 | $_firstimageID = $this->getStaticOSM($gmap, $overlay); |
144 | - $imgUrl .= $_firstimageID; |
|
144 | + $imgUrl .= $_firstimageID; |
|
145 | 145 | if ($this->getConf('optionStaticMapGenerator') == 'remote') { |
146 | 146 | $imgUrl .= "&.png"; |
147 | 147 | } |
148 | 148 | } |
149 | 149 | |
150 | 150 | // append dw p_render specific params and render |
151 | - $imgUrl .= "?" . str_replace("px", "", $gmap ['width']) . "x" |
|
151 | + $imgUrl .= "?".str_replace("px", "", $gmap ['width'])."x" |
|
152 | 152 | . str_replace("px", "", $gmap ['height']); |
153 | 153 | $imgUrl .= "&nolink"; |
154 | 154 | |
@@ -157,13 +157,13 @@ discard block |
||
157 | 157 | $imgUrl .= "&nocache"; |
158 | 158 | } |
159 | 159 | |
160 | - $imgUrl .= " |" . $gmap ['summary'] . " }}"; |
|
160 | + $imgUrl .= " |".$gmap ['summary']." }}"; |
|
161 | 161 | |
162 | 162 | $mapid = $gmap ['id']; |
163 | 163 | // create a javascript parameter string for the map |
164 | 164 | $param = ''; |
165 | 165 | foreach ($gmap as $key => $val) { |
166 | - $param .= is_numeric($val) ? "$key: $val, " : "$key: '" . hsc($val) . "', "; |
|
166 | + $param .= is_numeric($val) ? "$key: $val, " : "$key: '".hsc($val)."', "; |
|
167 | 167 | } |
168 | 168 | if (!empty($param)) { |
169 | 169 | $param = substr($param, 0, -2); |
@@ -190,12 +190,12 @@ discard block |
||
190 | 190 | |
191 | 191 | $poitable .= ' |
192 | 192 | <tr> |
193 | - <td class="rowId">' . $rowId . '</td> |
|
194 | - <td class="icon"><img src="' . DOKU_BASE . 'lib/plugins/openlayersmap/icons/' . $img . '" alt="' |
|
195 | - . substr($img, 0, -4) . $this->getlang('alt_legend_poi') . '" /></td> |
|
196 | - <td class="lat" title="' . $this->getLang('olmapPOIlatTitle') . '">' . $lat . '</td> |
|
197 | - <td class="lon" title="' . $this->getLang('olmapPOIlonTitle') . '">' . $lon . '</td> |
|
198 | - <td class="txt">' . $text . '</td> |
|
193 | + <td class="rowId">' . $rowId.'</td> |
|
194 | + <td class="icon"><img src="' . DOKU_BASE.'lib/plugins/openlayersmap/icons/'.$img.'" alt="' |
|
195 | + . substr($img, 0, -4).$this->getlang('alt_legend_poi').'" /></td> |
|
196 | + <td class="lat" title="' . $this->getLang('olmapPOIlatTitle').'">'.$lat.'</td> |
|
197 | + <td class="lon" title="' . $this->getLang('olmapPOIlonTitle').'">'.$lon.'</td> |
|
198 | + <td class="txt">' . $text.'</td> |
|
199 | 199 | </tr>'; |
200 | 200 | } |
201 | 201 | $poi = substr($poi, 2); |
@@ -205,9 +205,9 @@ discard block |
||
205 | 205 | <tr> |
206 | 206 | <td class="rowId"><img src="' . DOKU_BASE |
207 | 207 | . 'lib/plugins/openlayersmap/toolbar/kml_file.png" alt="KML file" /></td> |
208 | - <td class="icon"><img src="' . DOKU_BASE . 'lib/plugins/openlayersmap/toolbar/kml_line.png" alt="' |
|
209 | - . $this->getlang('alt_legend_kml') . '" /></td> |
|
210 | - <td class="txt" colspan="3">KML track: ' . $this->getFileName($gmap ['kmlfile']) . '</td> |
|
208 | + <td class="icon"><img src="' . DOKU_BASE.'lib/plugins/openlayersmap/toolbar/kml_line.png" alt="' |
|
209 | + . $this->getlang('alt_legend_kml').'" /></td> |
|
210 | + <td class="txt" colspan="3">KML track: ' . $this->getFileName($gmap ['kmlfile']).'</td> |
|
211 | 211 | </tr>'; |
212 | 212 | } |
213 | 213 | if (!empty($gmap ['gpxfile'])) { |
@@ -217,8 +217,8 @@ discard block |
||
217 | 217 | . 'lib/plugins/openlayersmap/toolbar/gpx_file.png" alt="GPX file" /></td> |
218 | 218 | <td class="icon"><img src="' . DOKU_BASE |
219 | 219 | . 'lib/plugins/openlayersmap/toolbar/gpx_line.png" alt="' |
220 | - . $this->getlang('alt_legend_gpx') . '" /></td> |
|
221 | - <td class="txt" colspan="3">GPX track: ' . $this->getFileName($gmap ['gpxfile']) . '</td> |
|
220 | + . $this->getlang('alt_legend_gpx').'" /></td> |
|
221 | + <td class="txt" colspan="3">GPX track: ' . $this->getFileName($gmap ['gpxfile']).'</td> |
|
222 | 222 | </tr>'; |
223 | 223 | } |
224 | 224 | if (!empty($gmap ['geojsonfile'])) { |
@@ -228,14 +228,14 @@ discard block |
||
228 | 228 | . 'lib/plugins/openlayersmap/toolbar/geojson_file.png" alt="GeoJSON file" /></td> |
229 | 229 | <td class="icon"><img src="' . DOKU_BASE |
230 | 230 | . 'lib/plugins/openlayersmap/toolbar/geojson_line.png" alt="' |
231 | - . $this->getlang('alt_legend_geojson') . '" /></td> |
|
232 | - <td class="txt" colspan="3">GeoJSON track: ' . $this->getFileName($gmap ['geojsonfile']) . '</td> |
|
231 | + . $this->getlang('alt_legend_geojson').'" /></td> |
|
232 | + <td class="txt" colspan="3">GeoJSON track: ' . $this->getFileName($gmap ['geojsonfile']).'</td> |
|
233 | 233 | </tr>'; |
234 | 234 | } |
235 | 235 | |
236 | 236 | $autozoom = empty($gmap ['autozoom']) ? $this->getConf('autoZoomMap') : $gmap ['autozoom']; |
237 | - $js = "{mapOpts: {" . $param . ", displayformat: '" . $this->getConf('displayformat') |
|
238 | - . "', autozoom: " . $autozoom . "}, poi: [$poi]};"; |
|
237 | + $js = "{mapOpts: {".$param.", displayformat: '".$this->getConf('displayformat') |
|
238 | + . "', autozoom: ".$autozoom."}, poi: [$poi]};"; |
|
239 | 239 | // unescape the json |
240 | 240 | $poitable = stripslashes($poitable); |
241 | 241 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | // parse match for instructions, break into key value pairs |
257 | 257 | $gmap = $this->dflt; |
258 | 258 | foreach ($gmap as $key => &$value) { |
259 | - $defval = $this->getConf('default_' . $key); |
|
259 | + $defval = $this->getConf('default_'.$key); |
|
260 | 260 | if ($defval !== '') { |
261 | 261 | $value = $defval; |
262 | 262 | } |
@@ -358,29 +358,29 @@ discard block |
||
358 | 358 | // see: https://developers.google.com/maps/documentation/staticmaps/index#Viewports |
359 | 359 | // http://maps.google.com/maps/api/staticmap?center=51.565690,5.456756&zoom=16&size=600x400&markers=icon:http://wild-water.nl/dokuwiki/lib/plugins/openlayersmap/icons/marker.png|label:1|51.565690,5.456756&markers=icon:http://wild-water.nl/dokuwiki/lib/plugins/openlayersmap/icons/marker-blue.png|51.566197,5.458966|label:2&markers=icon:http://wild-water.nl/dokuwiki/lib/plugins/openlayersmap/icons/parking.png|51.567177,5.457909|label:3&markers=icon:http://wild-water.nl/dokuwiki/lib/plugins/openlayersmap/icons/parking.png|51.566283,5.457330|label:4&markers=icon:http://wild-water.nl/dokuwiki/lib/plugins/openlayersmap/icons/parking.png|51.565630,5.457695|label:5&sensor=false&format=png&maptype=roadmap |
360 | 360 | $imgUrl = "https://maps.googleapis.com/maps/api/staticmap?"; |
361 | - $imgUrl .= "&size=" . str_replace("px", "", $gmap ['width']) . "x" |
|
361 | + $imgUrl .= "&size=".str_replace("px", "", $gmap ['width'])."x" |
|
362 | 362 | . str_replace("px", "", $gmap ['height']); |
363 | 363 | //if (!$this->getConf( 'autoZoomMap')) { // no need for center & zoom params } |
364 | - $imgUrl .= "¢er=" . $gmap ['lat'] . "," . $gmap ['lon']; |
|
364 | + $imgUrl .= "¢er=".$gmap ['lat'].",".$gmap ['lon']; |
|
365 | 365 | // max is 21 (== building scale), but that's overkill.. |
366 | 366 | if ($gmap ['zoom'] > 17) { |
367 | 367 | $imgUrl .= "&zoom=17"; |
368 | 368 | } else { |
369 | - $imgUrl .= "&zoom=" . $gmap ['zoom']; |
|
369 | + $imgUrl .= "&zoom=".$gmap ['zoom']; |
|
370 | 370 | } |
371 | 371 | if ($overlay !== []) { |
372 | 372 | $rowId = 0; |
373 | 373 | foreach ($overlay as $data) { |
374 | 374 | [$lat, $lon, $text, $angle, $opacity, $img] = $data; |
375 | - $imgUrl .= "&markers=icon%3a" . $sUrl . "lib/plugins/openlayersmap/icons/" . $img . "%7c" |
|
376 | - . $lat . "," . $lon . "%7clabel%3a" . ++$rowId; |
|
375 | + $imgUrl .= "&markers=icon%3a".$sUrl."lib/plugins/openlayersmap/icons/".$img."%7c" |
|
376 | + . $lat.",".$lon."%7clabel%3a".++$rowId; |
|
377 | 377 | } |
378 | 378 | } |
379 | - $imgUrl .= "&format=png&maptype=" . $maptype; |
|
379 | + $imgUrl .= "&format=png&maptype=".$maptype; |
|
380 | 380 | global $conf; |
381 | - $imgUrl .= "&language=" . $conf ['lang']; |
|
381 | + $imgUrl .= "&language=".$conf ['lang']; |
|
382 | 382 | if ($this->getConf('googleAPIkey')) { |
383 | - $imgUrl .= "&key=" . $this->getConf('googleAPIkey'); |
|
383 | + $imgUrl .= "&key=".$this->getConf('googleAPIkey'); |
|
384 | 384 | } |
385 | 385 | return $imgUrl; |
386 | 386 | } |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | if (($geophp = plugin_load('helper', 'geophp')) === null) { |
474 | 474 | Logger::debug('geophp plugin is not available for use.', $geophp); |
475 | 475 | } |
476 | - $size = str_replace("px", "", $gmap ['width']) . "x" |
|
476 | + $size = str_replace("px", "", $gmap ['width'])."x" |
|
477 | 477 | . str_replace("px", "", $gmap ['height']); |
478 | 478 | |
479 | 479 | $markers = []; |
@@ -493,19 +493,19 @@ discard block |
||
493 | 493 | break; |
494 | 494 | case 'transport': |
495 | 495 | $maptype = 'transport'; |
496 | - $apikey = '?apikey=' . $this->getConf('tfApiKey'); |
|
496 | + $apikey = '?apikey='.$this->getConf('tfApiKey'); |
|
497 | 497 | break; |
498 | 498 | case 'landscape': |
499 | 499 | $maptype = 'landscape'; |
500 | - $apikey = '?apikey=' . $this->getConf('tfApiKey'); |
|
500 | + $apikey = '?apikey='.$this->getConf('tfApiKey'); |
|
501 | 501 | break; |
502 | 502 | case 'outdoors': |
503 | 503 | $maptype = 'outdoors'; |
504 | - $apikey = '?apikey=' . $this->getConf('tfApiKey'); |
|
504 | + $apikey = '?apikey='.$this->getConf('tfApiKey'); |
|
505 | 505 | break; |
506 | 506 | case 'cycle map': |
507 | 507 | $maptype = 'cycle'; |
508 | - $apikey = '?apikey=' . $this->getConf('tfApiKey'); |
|
508 | + $apikey = '?apikey='.$this->getConf('tfApiKey'); |
|
509 | 509 | break; |
510 | 510 | case 'hike and bike map': |
511 | 511 | $maptype = 'hikeandbike'; |
@@ -542,25 +542,25 @@ discard block |
||
542 | 542 | // ol-marker|47.921629720114,18.027343747285,ol-marker-gold|47.951071133739,19.257812497236, |
543 | 543 | // ol-marker-blue|47.180141361692,19.257812497236,ol-marker-green |
544 | 544 | $imgUrl = "https://staticmap.openstreetmap.de/staticmap.php"; |
545 | - $imgUrl .= "?center=" . $gmap ['lat'] . "," . $gmap ['lon']; |
|
546 | - $imgUrl .= "&size=" . str_replace("px", "", $gmap ['width']) . "x" |
|
545 | + $imgUrl .= "?center=".$gmap ['lat'].",".$gmap ['lon']; |
|
546 | + $imgUrl .= "&size=".str_replace("px", "", $gmap ['width'])."x" |
|
547 | 547 | . str_replace("px", "", $gmap ['height']); |
548 | 548 | |
549 | 549 | if ($gmap ['zoom'] > 16) { |
550 | 550 | // actually this could even be 18, but that seems overkill |
551 | 551 | $imgUrl .= "&zoom=16"; |
552 | 552 | } else { |
553 | - $imgUrl .= "&zoom=" . $gmap ['zoom']; |
|
553 | + $imgUrl .= "&zoom=".$gmap ['zoom']; |
|
554 | 554 | } |
555 | 555 | |
556 | 556 | if ($overlay !== []) { |
557 | - $rowId = 0; |
|
557 | + $rowId = 0; |
|
558 | 558 | $imgUrl .= "&markers="; |
559 | 559 | foreach ($overlay as $data) { |
560 | 560 | [$lat, $lon, $text, $angle, $opacity, $img] = $data; |
561 | 561 | $rowId++; |
562 | 562 | $iconStyle = "lightblue$rowId"; |
563 | - $imgUrl .= "$lat,$lon,$iconStyle%7c"; |
|
563 | + $imgUrl .= "$lat,$lon,$iconStyle%7c"; |
|
564 | 564 | } |
565 | 565 | $imgUrl = substr($imgUrl, 0, -3); |
566 | 566 | } |
@@ -595,13 +595,13 @@ discard block |
||
595 | 595 | $maptype = 'Road'; |
596 | 596 | break; |
597 | 597 | } |
598 | - $imgUrl = "https://dev.virtualearth.net/REST/v1/Imagery/Map/" . $maptype;// . "/"; |
|
598 | + $imgUrl = "https://dev.virtualearth.net/REST/v1/Imagery/Map/".$maptype; // . "/"; |
|
599 | 599 | if ($this->getConf('autoZoomMap')) { |
600 | 600 | $bbox = $this->calcBBOX($overlay, $gmap ['lat'], $gmap ['lon']); |
601 | 601 | //$imgUrl .= "?ma=" . $bbox ['minlat'] . "," . $bbox ['minlon'] . "," |
602 | 602 | // . $bbox ['maxlat'] . "," . $bbox ['maxlon']; |
603 | - $imgUrl .= "?ma=" . $bbox ['minlat'] . "%2C" . $bbox ['minlon'] . "%2C" . $bbox ['maxlat'] |
|
604 | - . "%2C" . $bbox ['maxlon']; |
|
603 | + $imgUrl .= "?ma=".$bbox ['minlat']."%2C".$bbox ['minlon']."%2C".$bbox ['maxlat'] |
|
604 | + . "%2C".$bbox ['maxlon']; |
|
605 | 605 | $imgUrl .= "&dcl=1"; |
606 | 606 | } |
607 | 607 | if (strpos($imgUrl, "?") === false) |
@@ -609,9 +609,9 @@ discard block |
||
609 | 609 | |
610 | 610 | //$imgUrl .= "&ms=" . str_replace ( "px", "", $gmap ['width'] ) . "," |
611 | 611 | // . str_replace ( "px", "", $gmap ['height'] ); |
612 | - $imgUrl .= "&ms=" . str_replace("px", "", $gmap ['width']) . "%2C" |
|
612 | + $imgUrl .= "&ms=".str_replace("px", "", $gmap ['width'])."%2C" |
|
613 | 613 | . str_replace("px", "", $gmap ['height']); |
614 | - $imgUrl .= "&key=" . $this->getConf('bingAPIKey'); |
|
614 | + $imgUrl .= "&key=".$this->getConf('bingAPIKey'); |
|
615 | 615 | if ($overlay !== []) { |
616 | 616 | $rowId = 0; |
617 | 617 | foreach ($overlay as $data) { |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | } |
631 | 631 | global $conf; |
632 | 632 | $imgUrl .= "&fmt=png"; |
633 | - $imgUrl .= "&c=" . $conf ['lang']; |
|
633 | + $imgUrl .= "&c=".$conf ['lang']; |
|
634 | 634 | return $imgUrl; |
635 | 635 | } |
636 | 636 | |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | $latPos = "N"; |
677 | 677 | } |
678 | 678 | $dms = $this->convertDDtoDMS(abs($decimaldegrees)); |
679 | - return hsc($dms . $latPos); |
|
679 | + return hsc($dms.$latPos); |
|
680 | 680 | } |
681 | 681 | |
682 | 682 | /** |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | $secs = ($decimaldegrees - $dms) * 3600; |
693 | 693 | $min = floor($secs / 60); |
694 | 694 | $sec = round($secs - ($min * 60), 3); |
695 | - $dms .= 'º' . $min . '\'' . $sec . '"'; |
|
695 | + $dms .= 'º'.$min.'\''.$sec.'"'; |
|
696 | 696 | return $dms; |
697 | 697 | } |
698 | 698 | |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | $lonPos = "E"; |
711 | 711 | } |
712 | 712 | $dms = $this->convertDDtoDMS(abs($decimaldegrees)); |
713 | - return hsc($dms . $lonPos); |
|
713 | + return hsc($dms.$lonPos); |
|
714 | 714 | } |
715 | 715 | |
716 | 716 | /** |
@@ -752,50 +752,50 @@ discard block |
||
752 | 752 | if (!$initialised) { |
753 | 753 | $initialised = true; |
754 | 754 | // render necessary script tags only once |
755 | - $olscript = '<script defer="defer" src="' . DOKU_BASE . 'lib/plugins/openlayersmap/ol/ol.js"></script> |
|
756 | -<script defer="defer" src="' . DOKU_BASE . 'lib/plugins/openlayersmap/ol/ol-layerswitcher.js"></script>'; |
|
755 | + $olscript = '<script defer="defer" src="'.DOKU_BASE.'lib/plugins/openlayersmap/ol/ol.js"></script> |
|
756 | +<script defer="defer" src="' . DOKU_BASE.'lib/plugins/openlayersmap/ol/ol-layerswitcher.js"></script>'; |
|
757 | 757 | |
758 | 758 | $scriptEnable = '<script defer="defer" src="data:text/javascript;base64,'; |
759 | 759 | $scriptSrc = $olscript ? 'const olEnable=true;' : 'const olEnable=false;'; |
760 | - $scriptSrc .= 'const osmEnable=' . ($osmEnable ? 'true' : 'false') . ';'; |
|
761 | - $scriptSrc .= 'const stadiaEnable=' . ($stadiaEnable ? 'true' : 'false') . ';'; |
|
762 | - $scriptSrc .= 'const bEnable=' . ($enableBing ? 'true' : 'false') . ';'; |
|
763 | - $scriptSrc .= 'const bApiKey="' . $this->getConf('bingAPIKey') . '";'; |
|
764 | - $scriptSrc .= 'const tfApiKey="' . $this->getConf('tfApiKey') . '";'; |
|
765 | - $scriptSrc .= 'const gApiKey="' . $this->getConf('googleAPIkey') . '";'; |
|
760 | + $scriptSrc .= 'const osmEnable='.($osmEnable ? 'true' : 'false').';'; |
|
761 | + $scriptSrc .= 'const stadiaEnable='.($stadiaEnable ? 'true' : 'false').';'; |
|
762 | + $scriptSrc .= 'const bEnable='.($enableBing ? 'true' : 'false').';'; |
|
763 | + $scriptSrc .= 'const bApiKey="'.$this->getConf('bingAPIKey').'";'; |
|
764 | + $scriptSrc .= 'const tfApiKey="'.$this->getConf('tfApiKey').'";'; |
|
765 | + $scriptSrc .= 'const gApiKey="'.$this->getConf('googleAPIkey').'";'; |
|
766 | 766 | $scriptSrc .= 'olMapData = []; let olMaps = {}; let olMapOverlays = {};'; |
767 | 767 | $scriptEnable .= base64_encode($scriptSrc); |
768 | 768 | $scriptEnable .= '"></script>'; |
769 | 769 | } |
770 | 770 | $renderer->doc .= "$olscript\n$scriptEnable"; |
771 | - $renderer->doc .= '<div class="olMapHelp">' . $this->locale_xhtml("help") . '</div>'; |
|
771 | + $renderer->doc .= '<div class="olMapHelp">'.$this->locale_xhtml("help").'</div>'; |
|
772 | 772 | if ($this->getConf('enableA11y')) { |
773 | - $renderer->doc .= '<div id="' . $mapid . '-static" class="olStaticMap">' |
|
774 | - . p_render($format, p_get_instructions($staticImgUrl), $info) . '</div>'; |
|
773 | + $renderer->doc .= '<div id="'.$mapid.'-static" class="olStaticMap">' |
|
774 | + . p_render($format, p_get_instructions($staticImgUrl), $info).'</div>'; |
|
775 | 775 | } |
776 | - $renderer->doc .= '<div id="' . $mapid . '-clearer" class="clearer"><p> </p></div>'; |
|
776 | + $renderer->doc .= '<div id="'.$mapid.'-clearer" class="clearer"><p> </p></div>'; |
|
777 | 777 | if ($this->getConf('enableA11y')) { |
778 | 778 | // render a table of the POI for the print and a11y presentation, it is hidden using javascript |
779 | 779 | $renderer->doc .= ' |
780 | - <div id="' . $mapid . '-table-span" class="olPOItableSpan"> |
|
781 | - <table id="' . $mapid . '-table" class="olPOItable"> |
|
782 | - <caption class="olPOITblCaption">' . $this->getLang('olmapPOItitle') . '</caption> |
|
780 | + <div id="' . $mapid.'-table-span" class="olPOItableSpan"> |
|
781 | + <table id="' . $mapid.'-table" class="olPOItable"> |
|
782 | + <caption class="olPOITblCaption">' . $this->getLang('olmapPOItitle').'</caption> |
|
783 | 783 | <thead class="olPOITblHeader"> |
784 | 784 | <tr> |
785 | 785 | <th class="rowId" scope="col">id</th> |
786 | - <th class="icon" scope="col">' . $this->getLang('olmapPOIicon') . '</th> |
|
787 | - <th class="lat" scope="col" title="' . $this->getLang('olmapPOIlatTitle') . '">' |
|
788 | - . $this->getLang('olmapPOIlat') . '</th> |
|
789 | - <th class="lon" scope="col" title="' . $this->getLang('olmapPOIlonTitle') . '">' |
|
790 | - . $this->getLang('olmapPOIlon') . '</th> |
|
791 | - <th class="txt" scope="col">' . $this->getLang('olmapPOItxt') . '</th> |
|
786 | + <th class="icon" scope="col">' . $this->getLang('olmapPOIicon').'</th> |
|
787 | + <th class="lat" scope="col" title="' . $this->getLang('olmapPOIlatTitle').'">' |
|
788 | + . $this->getLang('olmapPOIlat').'</th> |
|
789 | + <th class="lon" scope="col" title="' . $this->getLang('olmapPOIlonTitle').'">' |
|
790 | + . $this->getLang('olmapPOIlon').'</th> |
|
791 | + <th class="txt" scope="col">' . $this->getLang('olmapPOItxt').'</th> |
|
792 | 792 | </tr> |
793 | 793 | </thead>'; |
794 | 794 | if ($poitabledesc != '') { |
795 | - $renderer->doc .= '<tfoot class="olPOITblFooter"><tr><td colspan="5">' . $poitabledesc |
|
795 | + $renderer->doc .= '<tfoot class="olPOITblFooter"><tr><td colspan="5">'.$poitabledesc |
|
796 | 796 | . '</td></tr></tfoot>'; |
797 | 797 | } |
798 | - $renderer->doc .= '<tbody class="olPOITblBody">' . $poitable . '</tbody> |
|
798 | + $renderer->doc .= '<tbody class="olPOITblBody">'.$poitable.'</tbody> |
|
799 | 799 | </table> |
800 | 800 | </div>'; |
801 | 801 | $renderer->doc .= "\n"; |