0

ここでは、iPhone 用の Web ベースのアプリを開発しようとしています。ただし、これを実行すると、すべてが完全に機能します(ブラウザでテスト済み):

function goToLocation() {
    latitude = document.getElementById("<%=txtLatitude.ClientID%>").innerHTML;
    longitude = document.getElementById("<%=txtLongitude.ClientID%>").innerHTML;
    window.parent.location = 'http://maps.google.com/maps?q='latitude + ',' +
    longitude + '&z=14';
}

私のaspxと混合:

    <tr><td>Latitude: </td>
        <td><asp:Label ID="txtLatitude" runat="server"></asp:Label></td>
    </tr>
    <tr><td>Longitude: </td>
        <td><asp:Label ID="txtLongitude" runat="server"></asp:Label></td>
    </tr>

私は得る:

http://maps.google.com/maps?q=<a href="tel:11.111">11.111</a>,<a href="tel:22.222">22.222</a>

ここで、11.111 は緯度、22.222 は経度です。

パソコンのブラウザを使用すると、 http://maps.google.com/maps?q=11.111,22.222のように正しく表示されます

だから、私の質問は次のとおりだと思います:「tel:」を前に付けないようにiPhoneに指示する方法はありますか、または、javascriptに数字(自分で調べることができるもの)から始めるように指示することでこれを回避できると思います。しかし同時に、携帯電話に緯度と経度をリンクとして表示するのは好きではありません。

ありがとう!

4

0 に答える 0