在iphone中使用html查找当前位置 [英] Find current location by using html in iphone

查看:109
本文介绍了在iphone中使用html查找当前位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我发送包含目的地地址的电子邮件时,当用户点击该地址时,他应该从谷歌地图上的当前位置到目的地地址获取路线。

when i send email which contain destination address when user will click on that address he should get directions from his current location to destination address on google maps.

我试过使用以下代码

http://maps.google.com/maps?daddr=DestinationAddress&saddr=current+location&view=map&z=12

http://maps.google.com/maps?daddr=DestinationAddress&saddr=current+location&view=map&z=12"

但当前位置字不起作用。
如何通过仅使用html和谷歌地图找到用户在iphone中的当前位置。
我们可以将任何参数传递给谷歌地图,以便它可以跟踪用户的当前位置。
任何人都有任何想法吗?

but current location word does not worked. how can we find user's current location in iphone by using only html and google map. can we pass any parameter to google map so it can track user's current location. any one have any idea?

kinldy帮助我。

kinldy help me.

推荐答案

您可以在Javascript中获取该位置。

You can get the location in Javascript.

api基于此规范

并且这里是一个正在运行的样本。

And here's a running sample.

一些代码提取:

function findLocation() {
    navigator.geolocation.getCurrentPosition(foundCallback, errorCallback, {enableHighAccuracy:true,maximumAge:600000});
}

这篇关于在iphone中使用html查找当前位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆