2016-07-15 48 views
0

我正在製作一個網站,並且我有一個按鈕,可以從用戶位置打開谷歌地圖到其他地方。Gmaps問題上的HTML href:我的位置在微軟邊緣不起作用

<a href={'http://maps.google.com/maps?saddr=My+Location&daddr=Nexapp'} target="_blank"> 
    //Button here    
</a> 

問題是當我點擊與Microsoft Edge的鏈接時,我的位置在美國給了我一個隨機健身房。 Here's a screenshot of the result其他瀏覽器雖然給我我的位置,但...

任何人都有一個想法爲什麼以及如何解決它?

編輯:

這裏是我的成分(我使用Reactjs)代碼

<div id="content" className={styles.mapSection}> 
      <GoogleMap 
       latitude={46.829131} 
       longitude={-71.279030} 
       zoom={14} 
       width="100%" 
       height="100%" 
       marker={false} 
       mapOptions={mapOptions} /> 

      <div className={styles.mapOverlay}> 
       <h1 className={`text ${styles.mapText}`}> 
        <FormattedMessage id="googleText" {...messages.googleText} /> 
        <span className={styles.city}> 
         <FormattedMessage id="quebec" {...messages.quebec} /> 
        </span> 
       </h1> 
       <a className={`link ${styles.mapButton}`} href="http://maps.google.com/maps?saddr=My+Location&daddr=Nexapp" target="_blank"> 
        <ChevronRightButton mobile={mobile} text={<FormattedMessage id="locationButton" {...messages.locationButton} />} /> 
       </a> 
      </div> 
     </div> 

<a>不會改變,但@Sampson通緝代碼:P

+0

這HTML語法是無效的;你能提供額外的上下文嗎?你正在使用框架還是什麼?此外,您目前正在測試哪個版本的Microsoft Edge?您的鏈接似乎適用於我:http://i.imgur.com/C8bBRD4.gif – Sampson

+0

我正在使用Reactjs,因此語法是有效的 –

+0

您可以將此示例燒寫到儘可能少的代碼行嗎?我很樂意爲你更深入地瞭解這一點。 – Sampson

回答