• <bdo id='LE8qP'></bdo><ul id='LE8qP'></ul>
  • <i id='LE8qP'><tr id='LE8qP'><dt id='LE8qP'><q id='LE8qP'><span id='LE8qP'><b id='LE8qP'><form id='LE8qP'><ins id='LE8qP'></ins><ul id='LE8qP'></ul><sub id='LE8qP'></sub></form><legend id='LE8qP'></legend><bdo id='LE8qP'><pre id='LE8qP'><center id='LE8qP'></center></pre></bdo></b><th id='LE8qP'></th></span></q></dt></tr></i><div id='LE8qP'><tfoot id='LE8qP'></tfoot><dl id='LE8qP'><fieldset id='LE8qP'></fieldset></dl></div>
  • <small id='LE8qP'></small><noframes id='LE8qP'>

    <tfoot id='LE8qP'></tfoot>

    1. <legend id='LE8qP'><style id='LE8qP'><dir id='LE8qP'><q id='LE8qP'></q></dir></style></legend>
      1. iPhone 上的地理定位 API

        时间:2023-09-02
        <i id='K6yiB'><tr id='K6yiB'><dt id='K6yiB'><q id='K6yiB'><span id='K6yiB'><b id='K6yiB'><form id='K6yiB'><ins id='K6yiB'></ins><ul id='K6yiB'></ul><sub id='K6yiB'></sub></form><legend id='K6yiB'></legend><bdo id='K6yiB'><pre id='K6yiB'><center id='K6yiB'></center></pre></bdo></b><th id='K6yiB'></th></span></q></dt></tr></i><div id='K6yiB'><tfoot id='K6yiB'></tfoot><dl id='K6yiB'><fieldset id='K6yiB'></fieldset></dl></div>
            <bdo id='K6yiB'></bdo><ul id='K6yiB'></ul>

              <tbody id='K6yiB'></tbody>
              1. <legend id='K6yiB'><style id='K6yiB'><dir id='K6yiB'><q id='K6yiB'></q></dir></style></legend>

              2. <small id='K6yiB'></small><noframes id='K6yiB'>

                  <tfoot id='K6yiB'></tfoot>
                1. 本文介绍了iPhone 上的地理定位 API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  有谁知道 iPhone 是否支持或即将支持
                  (来源:
                  (来源:bemoko.com)

                  <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><头><title>地理定位 API 演示</title><元内容=宽度=设备宽度;初始比例=1.0;最大比例=1.0;用户可缩放=0;"名称="视口"/><脚本>功能成功处理程序(位置){var message = document.getElementById("message"), html = [];html.push("

                  Does anyone know whether the iPhone supports or will soon support the W3C Geolocation specification?

                  I'm looking to build an app for mobile users, but rather than spend the time developing apps for every different platform (iPhone, Android, etc...), I'd much prefer to create a web app that makes use of the W3C Standard.

                  解决方案

                  This code worked for me -- on the iPhone web browser Safari and as an added bonus it even worked with FireFox 3.5 on my laptop! The Geolocation API Specification is part of the W3 Consortium’s standards But be warned: it hasn’t been finalized as yet.


                  (source:
                  (source: bemoko.com)

                  <?xml version="1.0" encoding="UTF-8"?>
                  <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
                  <html xmlns="http://www.w3.org/1999/xhtml">
                  <head>
                  <title>Geolocation API Demo</title>
                  <meta content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" name="viewport"/>
                  <script>
                  function successHandler(location) {
                      var message = document.getElementById("message"), html = [];
                      html.push("<img width='256' height='256' src='http://maps.google.com/maps/api/staticmap?center=", location.coords.latitude, ",", location.coords.longitude, "&markers=size:small|color:blue|", location.coords.latitude, ",", location.coords.longitude, "&zoom=14&size=256x256&sensor=false' />");
                      html.push("<p>Longitude: ", location.coords.longitude, "</p>");
                      html.push("<p>Latitude: ", location.coords.latitude, "</p>");
                      html.push("<p>Accuracy: ", location.coords.accuracy, " meters</p>");
                      message.innerHTML = html.join("");
                  }
                  function errorHandler(error) {
                      alert('Attempt to get location failed: ' + error.message);
                  }
                  navigator.geolocation.getCurrentPosition(successHandler, errorHandler);
                  </script>
                  </head>
                  <body>
                  <div id="message">Location unknown</div>
                  </body>
                  </html>
                  

                  这篇关于iPhone 上的地理定位 API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                    <bdo id='iP69X'></bdo><ul id='iP69X'></ul>

                          <tbody id='iP69X'></tbody>
                        • <small id='iP69X'></small><noframes id='iP69X'>

                          <tfoot id='iP69X'></tfoot>

                          <i id='iP69X'><tr id='iP69X'><dt id='iP69X'><q id='iP69X'><span id='iP69X'><b id='iP69X'><form id='iP69X'><ins id='iP69X'></ins><ul id='iP69X'></ul><sub id='iP69X'></sub></form><legend id='iP69X'></legend><bdo id='iP69X'><pre id='iP69X'><center id='iP69X'></center></pre></bdo></b><th id='iP69X'></th></span></q></dt></tr></i><div id='iP69X'><tfoot id='iP69X'></tfoot><dl id='iP69X'><fieldset id='iP69X'></fieldset></dl></div>
                          <legend id='iP69X'><style id='iP69X'><dir id='iP69X'><q id='iP69X'></q></dir></style></legend>