Get geo coords?

xuanbao · · 354 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>So as I was pondering weak and weary at work, I came up with an idea. I won&#39;t get into details since it hinges (mostly) on one thing that I&#39;m uncertain of.</p> <p>Which brings me to ask this question: how (if at all) can I get the geo coordinates of a machine (laptop), using golang? Approximate with error up to 50 meters or so would be acceptable but I&#39;d like it to get it as close as possible.</p> <p>Anyway to do this that&#39;s clear cut or am I going to need to do a little hoop jumping?</p> <hr/>**评论:**<br/><br/>kpurdon: <pre><p>Could use <a href="http://dev.maxmind.com/geoip/geoip2/geolite2/" rel="nofollow">http://dev.maxmind.com/geoip/geoip2/geolite2/</a> w/ the device ip, but the accuracy is usually not great. If the device has a gps you&#39;ll have to see about accessing that data (that&#39;ll be different per os). Not a ton specific to go, just interacting with system apis or data. </p></pre>tywkeene: <pre><p>That would totally work, but I&#39;m trying to get at least up to a household a machine might be in. Maybe cross reference this with ssid&#39;s in range? </p> <p>Have you heard about any other possible way to get location data relatively accurate? This is the only part of this idea I&#39;m entirely at a loss for ideas with.</p> <p>This may be harder than I thought. I appreciate the hint though. Cheers, gopher.</p></pre>twisted1919: <pre><p>Using something like geoip will get you the location of the provider, won&#39;t tell you where the guy having that ip actually is, so it is not accurate. I think that if you need accuracy, the only way is to ask for the location via javascript. </p></pre>daniels0xff: <pre><p>Not to mention VPNs. Best way would be using GPS module if possible.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

354 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传