admin管理员组文章数量:1208155
How do I make an address clickable (detectable) by a mobile phone (similar to how phone numbers are)?
For addresses, it doesn't work directly. Is there perhaps an HTML tag for this?
How do I make an address clickable (detectable) by a mobile phone (similar to how phone numbers are)?
For addresses, it doesn't work directly. Is there perhaps an HTML tag for this?
Share Improve this question edited Jun 26, 2024 at 2:52 Melanie Shebel 2,9146 gold badges33 silver badges53 bronze badges asked Dec 15, 2011 at 14:22 xmuxxmux 7382 gold badges12 silver badges28 bronze badges 2- There is an <address> tag in HTML. Maybe that's what you should be using. Not sure if the phone browsers recognize it and makes it clickable, like it does with phone numbers. http://www.w3schools.com/html5/tag_address.asp – techfoobar Commented Dec 15, 2011 at 14:37
- The webview that displays it must be configured to do so. – LuckyLuke Commented Dec 15, 2011 at 14:44
3 Answers
Reset to default 14Mobile devices look for 'http://maps.google.com/maps?' in the URL to launch the google maps app.
<a href='http://maps.google.com/maps?q=New+York+city&hl=en&sll=37.0625,-95.677068&sspn=58.598104,135.263672&vpsrc=1&hnear=New+York&t=m&z=11'>View in google maps</a>
You could use Google Maps URL as mentioned in another answer, but I would recommend keeping it agnostic and having the address open in the user's default map application.
You can do this with the geo: URI Scheme.
Here's an example:
<a href="geo:0,0?q=1600+Pennsylvania+Avenue+NW,+Washington,+DC">1600 Pennsylvania Avenue NW, Washington, DC</a>
Try using Microdata.
本文标签: javascriptHow to make an address clickable on a mobile device (like phone numbers are)Stack Overflow
版权声明:本文标题:javascript - How to make an address clickable on a mobile device (like phone numbers are)? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738706442a2107941.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论