1<?php 2/* 3 * Copyright (c) 2008-2011 Mark C. Prins <mc.prins@gmail.com> 4* 5* Permission to use, copy, modify, and distribute this software for any 6* purpose with or without fee is hereby granted, provided that the above 7* copyright notice and this permission notice appear in all copies. 8* 9* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16*/ 17 18/** 19 * Plugin OL Maps: Allow Display of a OpenLayers Map in a wiki page. 20 * 21 * @author Mark Prins 22 */ 23 24if (!defined('DOKU_INC')) 25define('DOKU_INC', realpath(dirname(__FILE__) . '/../../') . '/'); 26if (!defined('DOKU_PLUGIN')) 27define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); 28require_once (DOKU_PLUGIN . 'syntax.php'); 29 30/** 31 * All DokuWiki plugins to extend the parser/rendering mechanism 32 * need to inherit from this class 33 */ 34class syntax_plugin_openlayersmap_olmap extends DokuWiki_Syntax_Plugin { 35 /** defaults of the known attributes of the olmap tag. */ 36 private $dflt = array ( 37 'id' => 'olmap', 38 'width' => '550px', 39 'height' => '450px', 40 'lat' => 50.0, 41 'lon' => 5.1, 42 'zoom' => 12, 43 'toolbar' => true, 44 'statusbar' => true, 45 'controls' => true, 46 'poihoverstyle' => false, 47 'baselyr' =>'OpenStreetMap', 48 'gpxfile' => '', 49 'kmlfile' => '', 50 'summary' =>'' 51 ); 52 53 /** 54 * Return the type of syntax this plugin defines. 55 * @Override 56 */ 57 function getType() { 58 return 'substition'; 59 } 60 61 /** 62 * Defines how this syntax is handled regarding paragraphs. 63 * @Override 64 */ 65 function getPType() { 66 //normal block stack 67 return 'block'; 68 } 69 70 /** 71 * Returns a number used to determine in which order modes are added. 72 * @Override 73 */ 74 function getSort() { 75 return 901; 76 } 77 78 /** 79 * This function is inherited from Doku_Parser_Mode. 80 * Here is the place to register the regular expressions needed 81 * to match your syntax. 82 * @Override 83 */ 84 function connectTo($mode) { 85 $this->Lexer->addSpecialPattern('<olmap ?[^>\n]*>.*?</olmap>', $mode, 'plugin_openlayersmap_olmap'); 86 } 87 88 /** 89 * handle each olmap tag. prepare the matched syntax for use in the renderer. 90 * @Override 91 */ 92 function handle($match, $state, $pos, &$handler) { 93 // break matched cdata into its components 94 list ($str_params, $str_points) = explode('>', substr($match, 7, -9), 2); 95 // get the lat/lon for adding them to the metadata (used by geotag) 96 preg_match('(lat[:|=]\"\d*\.\d*\")',$match,$mainLat); 97 preg_match('(lon[:|=]\"\d*\.\d*\")',$match,$mainLon); 98 $mainLat=substr($mainLat[0],5,-1); 99 $mainLon=substr($mainLon[0],5,-1); 100 101 $gmap = $this->_extract_params($str_params); 102 $overlay = $this->_extract_points($str_points); 103 104 $imgUrl = "{{"; 105 // choose maptype based on tag 106 if (stripos($gmap['baselyr'],'google') !== false){ 107 // use google 108 $imgUrl .= $this->_getGoogle($gmap, $overlay); 109 } elseif (stripos($gmap['baselyr'],'ve') !== false){ 110 // use bing 111 $imgUrl .= $this->_getBing($gmap, $overlay); 112 } elseif (stripos($gmap['baselyr'],'bing') !== false){ 113 // use bing 114 $imgUrl .= $this->_getBing($gmap, $overlay); 115 } elseif (stripos($gmap['baselyr'],'mapquest') !== false){ 116 // use mapquest 117 $imgUrl .=$this->_getMapQuest($gmap,$overlay); 118 } else { 119 // use http://staticmap.openstreetmap.de 120 $imgUrl .=$this->_getStaticOSM($gmap,$overlay); 121 } 122 123 // append dw specific params 124 $imgUrl .="&.png?".$gmap['width']."x".$gmap['height']; 125 $imgUrl .= "&nolink"; 126 $imgUrl .= " |".$gmap['summary']." }} "; 127 // remove 'px' 128 $imgUrl = str_replace("px", "",$imgUrl); 129 130 $imgUrl=p_render("xhtml", p_get_instructions($imgUrl), $info); 131 132 $mapid = $gmap['id']; 133 134 // determine width and height (inline styles) for the map image 135 // if ($gmap['width'] || $gmap['height']) { 136 // $style = $gmap['width'] ? 'width: ' . $gmap['width'] . ";" : ""; 137 // $style .= $gmap['height'] ? 'height: ' . $gmap['height'] . ";" : ""; 138 // $style = "style='$style'"; 139 // } else { 140 // $style = ''; 141 //} 142 143 // unset gmap values for width and height - they don't go into javascript 144 // unset ($gmap['width'], $gmap['height']); 145 146 // create a javascript parameter string for the map 147 $param = ''; 148 foreach ($gmap as $key => $val) { 149 $param .= is_numeric($val) ? "$key: $val, " : "$key: '" . hsc($val) . "', "; 150 } 151 if (!empty ($param)) { 152 $param = substr($param, 0, -2); 153 } 154 unset ($gmap['id']); 155 156 // create a javascript serialisation of the point data 157 $poi = ''; 158 $poitable=''; 159 $rowId=0; 160 if (!empty ($overlay)) { 161 foreach ($overlay as $data) { 162 list ($lat, $lon, $text, $angle, $opacity, $img) = $data; 163 $rowId++; 164 $poi .= ", {lat: $lat, lon: $lon, txt: '$text', angle: $angle, opacity: $opacity, img: '$img', rowId: $rowId}"; 165 $poitable .=' 166 <tr> 167 <td class="rowId">'.$rowId.'</td> 168 <td class="icon"><img src="'.DOKU_BASE.'/lib/plugins/openlayersmap/icons/'.$img.'" alt="icon" /></td> 169 <td class="lat" title="'.$this->getLang('olmapPOIlatTitle').'">'.$lat.'</td> 170 <td class="lon" title="'.$this->getLang('olmapPOIlonTitle').'">'.$lon.'</td> 171 <td class="txt">'.$text.'</td> 172 </tr>'; 173 } 174 $poi = substr($poi, 2); 175 } 176 $js .= "createMap({" . $param . " },[$poi]);"; 177 // unescape the json 178 $poitable = stripslashes($poitable); 179 180 return array($mapid,$js,$mainLat,$mainLon,$poitable,$gmap['summary'],$imgUrl); 181 } 182 183 /** 184 * render html tag/output. render the content. 185 * @Override 186 */ 187 function render($mode, &$renderer, $data) { 188 static $initialised = false; // set to true after script initialisation 189 list ($mapid, $param, $mainLat, $mainLon, $poitable, $poitabledesc, $staticImgUrl) = $data; 190 191 if ($mode == 'xhtml') { 192 $olscript = ''; 193 $olEnable = false; 194 $gscript = ''; 195 $gEnable = $this->getConf('enableGoogle'); 196 $vscript = ''; 197 $vEnable = false; 198 //$yscript = ''; 199 //$yEnable = false; 200 $mqEnable = $this->getConf('enableMapQuest'); 201 $osmEnable = $this->getConf('enableOSM'); 202 $enableBing = $this->getConf('enableBing'); 203 204 $scriptEnable = ''; 205 206 if (!$initialised) { 207 $initialised = true; 208 // render necessary script tags 209 // $gscript = $this->getConf('googleScriptUrl'); 210 // $gscript = $gscript ? '<script type="text/javascript" src="' . $gscript . '"></script>' : ""; 211 if($gEnable){ 212 $gscript ='<script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3&sensor=false"></script>'; 213 } 214 215 $vscript = $this->getConf('veScriptUrl'); 216 $vscript = $vscript ? '<script type="text/javascript" src="' . $vscript . '"></script>' : ""; 217 218 //$yscript = $this->getConf('yahooScriptUrl'); 219 //$yscript = $yscript ? '<script type="text/javascript" src="' . $yscript . '"></script>' : ""; 220 221 $olscript = $this->getConf('olScriptUrl'); 222 $olscript = $olscript ? '<script type="text/javascript" src="' . $olscript . '"></script>' : ""; 223 $olscript = str_replace('DOKU_BASE/', DOKU_BASE, $olscript); 224 225 $scriptEnable = '<script type="text/javascript">' . "\n" . '<!--//--><![CDATA[//><!--' . "\n"; 226 $scriptEnable .= $olscript ? 'olEnable = true;' : 'olEnable = false;'; 227 //$scriptEnable .= $yscript ? ' yEnable = true;' : ' yEnable = false;'; 228 $scriptEnable .= $vscript ? ' veEnable = true;' : ' veEnable = false;'; 229 $scriptEnable .= 'gEnable = '.($gEnable ? 'true' : 'false').';'; 230 $scriptEnable .= 'osmEnable = '.($osmEnable ? 'true' : 'false').';'; 231 $scriptEnable .= 'mqEnable = '.($mqEnable ? 'true' : 'false').';'; 232 $scriptEnable .= 'bEnable = '.($enableBing ? 'true' : 'false').';'; 233 $scriptEnable .= 'bApiKey="'.$this->getConf('bingAPIKey').'";'; 234 $scriptEnable .= 'OpenLayers.ImgPath = "'.DOKU_BASE.'lib/plugins/openlayersmap/lib/'.$this->getConf('olMapStyle').'/";'; 235 $scriptEnable .= "\n" . '//--><!]]>' . "\n" . '</script>'; 236 } 237 $renderer->doc .= " 238 $gscript 239 $vscript 240 $olscript 241 $scriptEnable"; 242 243 $renderer->doc .= ' 244 <div id="'.$mapid.'-static" class="olStaticMap">'.$staticImgUrl.'</div> 245 <div id="'.$mapid.'-clearer" class="clearer"><p> </p></div>'; 246 247 // render a (hidden) table of the POI for the print and a11y presentation 248 $renderer->doc .= ' <div class="olPOItableSpan" id="'.$mapid.'-table-span"><table class="olPOItable" id="'.$mapid.'-table" summary="'.$poitabledesc.'" title="'.$this->getLang('olmapPOItitle').'"> 249 <caption class="olPOITblCaption">'.$this->getLang('olmapPOItitle').'</caption> 250 <thead class="olPOITblHeader"> 251 <tr> 252 <th class="rowId" scope="col">id</th> 253 <th class="icon" scope="col">'.$this->getLang('olmapPOIicon').'</th> 254 <th class="lat" scope="col" title="'.$this->getLang('olmapPOIlatTitle').'">'.$this->getLang('olmapPOIlat').'</th> 255 <th class="lon" scope="col" title="'.$this->getLang('olmapPOIlonTitle').'">'.$this->getLang('olmapPOIlon').'</th> 256 <th class="txt" scope="col">'.$this->getLang('olmapPOItxt').'</th> 257 </tr> 258 </thead> 259 <tfoot class="olPOITblFooter"><tr><td colspan="5">'.$poitabledesc.'</td></tr></tfoot> 260 <tbody class="olPOITblBody">'.$poitable.'</tbody> 261 </table></div>'; 262 //TODO no tfoot when $poitabledesc is empty 263 264 // render inline mapscript 265 $renderer->doc .=" <script type='text/javascript'><!--//--><![CDATA[//><!-- 266 var $mapid = $param 267 //--><!]]></script>"; 268 return true; 269 } elseif ($mode == 'metadata') { 270 // render metadata if available 271 if (!(($this->dflt['lat']==$mainLat)||($thisdflt['lon']==$mainLon))){ 272 // unless they are the default 273 $renderer->meta['geo']['lat'] = $mainLat; 274 $renderer->meta['geo']['lon'] = $mainLon; 275 } 276 return true; 277 } 278 return false; 279 } 280 281 /** 282 * extract parameters for the map from the parameter string 283 * 284 * @param string $str_params string of key="value" pairs 285 * @return array associative array of parameters key=>value 286 */ 287 private function _extract_params($str_params) { 288 $param = array (); 289 preg_match_all('/(\w*)="(.*?)"/us', $str_params, $param, PREG_SET_ORDER); 290 // parse match for instructions, break into key value pairs 291 $gmap = $this->dflt; 292 foreach ($param as $kvpair) { 293 list ($match, $key, $val) = $kvpair; 294 $key = strtolower($key); 295 if (isset ($gmap[$key])){ 296 if ($key == 'summary'){ 297 // preserve case for summary field 298 $gmap[$key] = $val; 299 }else { 300 $gmap[$key] = strtolower($val); 301 } 302 } 303 } 304 return $gmap; 305 } 306 307 /** 308 * extract overlay points for the map from the wiki syntax data 309 * 310 * @param string $str_points multi-line string of lat,lon,text triplets 311 * @return array multi-dimensional array of lat,lon,text triplets 312 */ 313 private function _extract_points($str_points) { 314 $point = array (); 315 //preg_match_all('/^([+-]?[0-9].*?),\s*([+-]?[0-9].*?),(.*?),(.*?),(.*?),(.*)$/um', $str_points, $point, PREG_SET_ORDER); 316 /* 317 group 1: ([+-]?[0-9]+(?:\.[0-9]*)?) 318 group 2: ([+-]?[0-9]+(?:\.[0-9]*)?) 319 group 3: (.*?) 320 group 4: (.*?) 321 group 5: (.*?) 322 group 6: (.*) 323 */ 324 preg_match_all('/^([+-]?[0-9]+(?:\.[0-9]*)?),\s*([+-]?[0-9]+(?:\.[0-9]*)?),(.*?),(.*?),(.*?),(.*)$/um', $str_points, $point, PREG_SET_ORDER); 325 // create poi array 326 $overlay = array (); 327 foreach ($point as $pt) { 328 list ($match, $lat, $lon, $angle, $opacity, $img, $text) = $pt; 329 $lat = is_numeric($lat) ? $lat : 0; 330 $lon = is_numeric($lon) ? $lon : 0; 331 $angle = is_numeric($angle) ? $angle : 0; 332 $opacity = is_numeric($opacity) ? $opacity : 0.8; 333 $img = trim($img); 334 // TODO validate using exist & set up default img? 335 $text = addslashes(str_replace("\n", "", p_render("xhtml", p_get_instructions($text), $info))); 336 $overlay[] = array($lat, $lon, $text, $angle, $opacity, $img); 337 } 338 return $overlay; 339 } 340 341 /** 342 * Create a MapQuest static map API image url. 343 * @param array $gmap 344 * @param array $overlay 345 */ 346 private function _getMapQuest($gmap,$overlay) { 347 $sUrl=$this->getConf('iconUrlOverload'); 348 if (!$sUrl){ 349 $sUrl=DOKU_URL; 350 } 351 switch ($gmap['baselyr']){ 352 case 'mapquest hybrid': 353 $maptype='hyb (Hybrid)'; 354 break; 355 case 'mapquest sat': 356 $maptype='sat (Satellite)'; 357 break; 358 case 'mapquest road': 359 default: 360 $maptype='map'; 361 break; 362 } 363 364 $imgUrl = "http://open.mapquestapi.com/staticmap/v3/getmap"; 365 $imgUrl .= "?center=".$gmap['lat'].",".$gmap['lon']; 366 $imgUrl .= "&size=".str_replace("px", "",$gmap['width']).",".str_replace("px", "",$gmap['height']); 367 // max level for mapquest is 16 368 if ($gmap['zoom']>16) { 369 $imgUrl .= "&zoom=16"; 370 } else { 371 $imgUrl .= "&zoom=".$gmap['zoom']; 372 } 373 // TODO mapquest allows using one image url with a multiplier $NUMBER eg: 374 // $NUMBER = 2 375 // $imgUrl .= DOKU_URL."/".DOKU_PLUGIN."/".getPluginName()."/icons/".$img.",$NUMBER,C,".$lat1.",".$lon1.",0,0,0,0,C,".$lat2.",".$lon2.",0,0,0,0"; 376 if (!empty ($overlay)) { 377 $imgUrl .= "&xis="; 378 foreach ($overlay as $data) { 379 list ($lat, $lon, $text, $angle, $opacity, $img) = $data; 380 $imgUrl .= $sUrl."lib/plugins/openlayersmap/icons/".$img.",1,C,".$lat.",".$lon.",0,0,0,0,"; 381 } 382 $imgUrl = substr($imgUrl,0,-1); 383 } 384 $imgUrl .= "&imageType=png&type=".$maptype; 385 dbglog($imgUrl,'syntax_plugin_openlayersmap_olmap::_getMapQuest: MapQuest image url is:'); 386 return $imgUrl; 387 } 388 /** 389 * 390 * Create a Google maps static image url w/ the poi. 391 * @param array $gmap 392 * @param array $overlay 393 */ 394 private function _getGoogle($gmap, $overlay){ 395 $sUrl=$this->getConf('iconUrlOverload'); 396 if (!$sUrl){ 397 $sUrl=DOKU_URL; 398 } 399 switch ($gmap['baselyr']){ 400 case 'google hybrid': 401 $maptype='hybrid'; 402 break; 403 case 'google sat': 404 $maptype='satellite'; 405 break; 406 case 'google relief': 407 $maptype='terrain'; 408 break; 409 case 'google road': 410 default: 411 $maptype='roadmap'; 412 break; 413 } 414 415 //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 416 $imgUrl = "http://maps.google.com/maps/api/staticmap"; 417 $imgUrl .= "?center=".$gmap['lat'].",".$gmap['lon']; 418 $imgUrl .= "&size=".str_replace("px", "",$gmap['width'])."x".str_replace("px", "",$gmap['height']); 419 // don't need this anymore $imgUrl .= "&key=".$this->getConf('googleAPIKey'); 420 // max is 21 (== building scale), but that's overkill.. 421 if ($gmap['zoom']>16) { 422 $imgUrl .= "&zoom=16"; 423 } else { 424 $imgUrl .= "&zoom=".$gmap['zoom']; 425 } 426 427 if (!empty ($overlay)) { 428 $rowId=0; 429 foreach ($overlay as $data) { 430 list ($lat, $lon, $text, $angle, $opacity, $img) = $data; 431 $imgUrl .= "&markers=icon%3a".$sUrl."lib/plugins/openlayersmap/icons/".$img."%7c".$lat.",".$lon."%7clabel%3a".++$rowId; 432 } 433 } 434 $imgUrl .= "&format=png&maptype=".$maptype."&sensor=false"; 435 global $conf; 436 $imgUrl .= "&language=".$conf['lang']; 437 dbglog($imgUrl,'syntax_plugin_openlayersmap_olmap::_getGoogle: Google image url is:'); 438 return $imgUrl; 439 } 440 441 /** 442 * 443 * Create a Bing maps static image url w/ the poi. 444 * @param array $gmap 445 * @param array $overlay 446 */ 447 private function _getBing($gmap, $overlay){ 448 if(!$this->getConf('bingAPIKey')){ 449 // in case there is no Bing api key 450 $this->_getMapQuest($gmap, $overlay); 451 } 452 switch ($gmap['baselyr']){ 453 case 've hybrid': 454 case 'bing hybrid': 455 $maptype='AerialWithLabels'; 456 break; 457 case 've sat': 458 case 'bing sat': 459 $maptype='Aerial'; 460 break; 461 case 've normal': 462 case 've road': 463 case 've': 464 case 'bing road': 465 default: 466 $maptype='Road'; 467 break; 468 } 469 470 // TODO since bing does not provide declutter or autozoom/fit we need to determine the bbox based on the poi and lat/lon ourselves 471 //http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/51.56573,5.45690/12?mapSize=400,400&key=Agm4PJzDOGz4Oy9CYKPlV-UtgmsfL2-zeSyfYjRhf57OQB_oj87j5pncKZSay5qY 472 $imgUrl = "http://dev.virtualearth.net/REST/v1/Imagery/Map/".$maptype."/".$gmap['lat'].",".$gmap['lon']."/".$gmap['zoom']; 473 $imgUrl .= "?ms=".str_replace("px", "",$gmap['width']).",".str_replace("px", "",$gmap['height']); 474 // create a bing api key at https://www.bingmapsportal.com/application 475 $imgUrl .= "&key=".$this->getConf('bingAPIKey'); 476 if (!empty ($overlay)) { 477 $rowId=0; 478 foreach ($overlay as $data) { 479 list ($lat, $lon, $text, $angle, $opacity, $img) = $data; 480 // TODO icon style lookup, see: http://msdn.microsoft.com/en-us/library/ff701719.aspx for iconStyle 481 // NOTE: the max number of pushpins is 18! 482 $iconStyle=32; 483 $rowId++; 484 $imgUrl .= "&pp=$lat,$lon;$iconStyle;$rowId"; 485 } 486 } 487 dbglog($imgUrl,'syntax_plugin_openlayersmap_olmap::_getBing: bing image url is:'); 488 return $imgUrl; 489 } 490 491 /** 492 * 493 * Create a static OSM map image url w/ the poi from http://staticmap.openstreetmap.de (staticMapLite) 494 * @param array $gmap 495 * @param array $overlay 496 */ 497 private function _getStaticOSM($gmap, $overlay){ 498 //http://staticmap.openstreetmap.de/staticmap.php?center=47.000622235634,10.117187497601&zoom=5&size=500x350 499 // &markers=48.999812532766,8.3593749976708,lightblue1|43.154850037315,17.499999997306,lightblue1|49.487527053077,10.820312497573,ltblu-pushpin|47.951071133739,15.917968747369,ol-marker|47.921629720114,18.027343747285,ol-marker-gold|47.951071133739,19.257812497236,ol-marker-blue|47.180141361692,19.257812497236,ol-marker-green 500 $imgUrl = "http://staticmap.openstreetmap.de/staticmap.php"; 501 $imgUrl .= "?center=".$gmap['lat'].",".$gmap['lon']; 502 $imgUrl .= "&size=".str_replace("px", "",$gmap['width'])."x".str_replace("px", "",$gmap['height']); 503 if ($gmap['zoom']>16) { 504 $imgUrl .= "&zoom=16"; 505 } else { 506 $imgUrl .= "&zoom=".$gmap['zoom']; 507 } 508 509 switch ($gmap['baselyr']){ 510 case 'mapnik': 511 $maptype='mapnik'; 512 break; 513 case 't@h': 514 $maptype='osmarenderer'; 515 break; 516 case 'cycle map': 517 $maptype='cycle'; 518 break; 519 default: 520 $maptype=''; 521 break; 522 } 523 $imgUrl .= "&maptype=".$maptype; 524 525 if (!empty ($overlay)) { 526 $rowId=0; 527 $imgUrl .= "&markers="; 528 foreach ($overlay as $data) { 529 list ($lat, $lon, $text, $angle, $opacity, $img) = $data; 530 $rowId++; 531 $iconStyle = "lightblue$rowId"; 532 $imgUrl .= "$lat,$lon,$iconStyle%7c"; 533 } 534 $imgUrl = substr($imgUrl,0,-3); 535 } 536 537 dbglog($imgUrl,'syntax_plugin_openlayersmap_olmap::_getStaticOSM: bing image url is:'); 538 return $imgUrl; 539 540 } 541}