TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Geo.js, Building location-aware mobile websites with Javascript

29 点作者 akaalias将近 16 年前

4 条评论

eapen将近 16 年前
Google Maps v3 (in beta) already utilizes the sensor variable - so I dont see how this is advantageous for a mobile website. As for desktop apps - Google also has an API function to determine your location based on your IP. But I dont think it utilizes Firefox's geo-location ability.<p>&#60;em&#62;What is the benefit of this API compared to whats already available?&#60;/em&#62;
评论 #698088 未加载
philfreo将近 16 年前
For those of you interested in a similar wrapper for offline storage (via Google Gears or HTML5 databases), here is the wrapper Google suggests you use: <a href="http://code.google.com/p/webstorageportabilitylayer/" rel="nofollow">http://code.google.com/p/webstorageportabilitylayer/</a>
a2tech将近 16 年前
Very cool-looks like this is the same code that is used in Google Maps for location awareness in Firefox. It doesn't seem to like Opera (or it could be my connection not being found) but it seems to be cross browser compatible.
评论 #697739 未加载
TweedHeads将近 16 年前
This snippet uses the new navigator.geolocation.getCurrentPosition() feature in Firefox 3.5<p>You will be redirected to Google Maps if you click the folowing link:<p>(You must click "share location" when prompted by the browser, you know, privacy concerns)<p><pre><code> javascript:navigator.geolocation.getCurrentPosition(function(position){window.location.href="http://maps.google.com/?ll="+position.coords.latitude+","+position.coords.longitude;}); </code></pre> Drop it in your bookmarks toolbar and presto!<p>Or get it from here <a href="http://mylittlehacks.appspot.com/geolocation" rel="nofollow">http://mylittlehacks.appspot.com/geolocation</a>
评论 #698123 未加载