2013-04-30 60 views
0

http://mtavares.geantduweb.ca/en/annonce?view=fiche&task=fiche.display&fiche_id=5定製谷歌地圖參數刪除迷你菜單

伊夫看了所有的地方...如何我關閉小地圖上的 地圖/ SAT /捷爾/地球菜單...我的用戶可以點擊on擴展地圖並獲取所有選項。但在小版本中沒有任何空間......任何人有任何想法?

這裏是(在PHP的Joomla 2.5)我的鏈接發生器:

function getGoogleMapData($data='') { 
    if (!is_array($data)) { 
     $data = array(); 
     $data['addr']   = $this->_data->addr; 
     $data['ville']  = $this->_data->city; 
     $data['province'] = $this->_data->province; 
     $data['postal'] = $this->_data->postal; 
    } 

    //Build the address into a string based on the data we have 
    $gm = array(); 
    $gm['addr'] = ''; 
    $gm['addr'] .= ($data['addr']!='') ? $data['addr'] : ''; 
    $gm['addr'] .= (($gm['addr']!='') && ($data['city']!='')) ? ',' : ''; 
    $gm['addr'] .= ($data['city']!='') ? $data['city'] : ''; 
    $gm['addr'] .= (($gm['addr']!='') && ($data['province']!='')) ? ',' : ''; 
    $gm['addr'] .= ($data['province']!='') ? $data['province'] : ''; 
    $gm['addr'] .= (($gm['addr']!='') && ($data['postal']!='')) ? ',' : ''; 
    $gm['addr'] .= ($data['postal']!='') ? $data['postal'] : ''; 
    $gm['param'] = ($gm['addr']!='') ? urlencode($gm['addr']) : ''; 

    //Use new address string and make URL to google map and a SRC URL for inside iframe (embed) 
    if ($gm['param']!='') { 
     //Popup window : &iwloc=A 
     //&sll=45.488370,-73.463742 
     if (JFactory::getLanguage()->getTag()=='en-GB') { 
      $lang='en'; 
     } else if (JFactory::getLanguage()->getTag()=='es-ES') { 
      $lang='es'; 
     } else { 
      $lang='fr'; 
     } 

     $gm['embed'] = sprintf('https://maps.google.ca/maps?q=%s&hl='.$lang.'&ie=UTF8&hq=&hnear=%s&t=m&z=14&output=embed', $gm['param'], $gm['param']); 
     $gm['url']  = sprintf('https://maps.google.ca/maps?q=%s&hl='.$lang.'&ie=UTF8&hq=&hnear=%s&t=m&z=14&source=embed', $gm['param'], $gm['param']); 

     if (JFactory::getApplication()->getName()!='site') { 
      //Remove adresse popup in iframe if back-end. window too small 
      $gm['embed'] = str_replace('iwloc=A&', 'iwloc=&', $gm['embed']); 
      $gm['url']  = str_replace('iwloc=A&', 'iwloc=&', $gm['url']); 
     } 
    } 

    return $gm; 
} //End of makeGoogleMap() 

我試過這個鏈接,但它並沒有幫助... http://www.seomoz.org/ugc/everything-you-never-wanted-to-know-about-google-maps-parameters

這部分去除白彈出...但如何防止點擊標記,它打開... ID改變點擊,所以它打開放大的版本或sumthing。

if (JFactory::getApplication()->getName()!='site') { 
     //Remove adresse popup in iframe if back-end. window too small 
     $gm['embed'] = str_replace('iwloc=A&', 'iwloc=&', $gm['embed']); 
     $gm['url']  = str_replace('iwloc=A&', 'iwloc=&', $gm['url']); 
    } 
+0

[google map small controls]的可能重複(http://stackoverflow.com/questions/8834188/google-map-smal (如果您確實在使用Google Maps API v3,請參考您的代碼) – geocodezip 2013-04-30 15:53:36

+0

沒有我的標籤說谷歌地圖...不是谷歌地圖API。我的iframe地圖只是基於常規搜索生成的鏈接。即時通訊不使用的API,因爲它需要一個API密鑰...我可能需要訴諸這...但目前我沒有看到需要。 – StiGMaT 2013-07-05 18:56:25

回答

0

猜測它不可行。

我的工作......周圍是使谷歌地圖更大,並把它更小的分度,切緣陰性和使用溢出圍繞它的內部:隱躲菜單...

如果我有更多房間我會離開菜單和谷歌徽標,但空間太小...

有點不好意思隱藏在底部的谷歌徽標...會留在那裏......但它的唯一途徑我發現中心標記要在框中居中...