public function buildHtml(&$params)
 {
     $url = parent::getUrl($params, $this->baseUrl);
     $html = parent::getIFrameBegin($params);
     if ($params->isLink() == 1) {
         $url .= "?q=" . $params->getAddress();
     }
     if ($params->isGoogleMapsEngine() == 1) {
         $url .= "&z=" . $params->getZoomLevel();
         $url .= "&t=" . $this->getMapType($params->getMapType());
         if (strcmp($params->getLanguage(), '-') != 0) {
             $url .= "&hl=" . $params->getLanguage();
         }
     }
     $html .= "src='{$url}&output=embed'></iframe>\n";
     if ($params->getAddLink() == 0) {
         if ($params->isGoogleMapsEngine() == 0) {
             $url = str_replace('/embed', '/viewer', $url);
         } else {
             if ($params->isLink() == 1) {
                 $url = str_replace('/maps', '/maps/preview', $url);
             }
         }
         $html .= parent::getLinkHtml($url, $params->getLinkLabel());
     }
     return $html;
 }
 public function buildHtml(&$params)
 {
     $url = parent::getUrl($params, $this->baseUrl);
     $html = parent::getIFrameBegin($params);
     if ($params->isLink() == 1) {
         $url .= "?key=" . $params->getEmbedAPIKey();
         $url .= "&q=" . urlencode($params->getAddress());
         $url .= "&zoom=" . $params->getZoomLevel();
         $url .= "&maptype=" . $this->getMapType($params->getMapType());
         if (strcmp($params->getLanguage(), '-') != 0) {
             $url .= "&language=" . $params->getLanguage();
         }
     }
     if ($params->isLink() == 0 && $params->isGoogleMapsEngine() == 1) {
         $html .= "src='{$url}&output=embed'></iframe>\n";
     } else {
         $html .= "src='{$url}'></iframe>\n";
     }
     if ($params->getAddLink() == 0) {
         if ($params->isGoogleMapsEngine() == 0) {
             $url = str_replace('/embed', '/viewer', $url);
             $html .= parent::getLinkHtml($url, $params->getLinkLabel());
         } else {
             if ($params->isLink() == 0) {
                 $html .= parent::getLinkHtml($url, $params->getLinkLabel());
             }
         }
     }
     return $html;
 }
 public function buildHtml(&$params)
 {
     $url = parent::getUrl($params, $this->baseUrl);
     $html = parent::getIFrameBegin($params);
     if ($params->isLink() == 1) {
         $url .= "?q=" . $params->getAddress();
         if (strlen($params->getInfoLabel()) > 0) {
             $url .= "(" . $params->getInfoLabel() . ")";
         }
     }
     if ($params->isGoogleMapsEngine() == 1) {
         $url .= "&z=" . $params->getZoomLevel();
         $url .= "&t=" . $params->getMapType();
         if (strcmp($params->getLanguage(), '-') != 0) {
             $url .= "&hl=" . $params->getLanguage();
         }
         $info = $params->getShowInfo() == 0 ? "" : "&iwloc=near";
         // Unicode properties are available only if PCRE is compiled with "--enable-unicode-properties"
         // '\pL' = any Unicode letter
         if (preg_match('/^[^\\pL]+$/u', $params->getAddress())) {
             $info = $params->getShowInfo() == 0 ? "&iwloc=near" : "";
         }
         $url .= $info;
     }
     $html .= "src='{$url}&output=svembed'></iframe>\n";
     if ($params->getAddLink() == 0) {
         $output = $params->getLinkFull() == 0 ? "&output=svembed" : "&output=classic";
         if ($params->isGoogleMapsEngine() == 0) {
             $url = str_replace('/embed', '/viewer', $url);
         } else {
             $url .= $output;
         }
         $html .= parent::getLinkHtml($url, $params->getLinkLabel());
     }
     return $html;
 }