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

    <small id='Cfpuq'></small><noframes id='Cfpuq'>

    <tfoot id='Cfpuq'></tfoot>
  1. <legend id='Cfpuq'><style id='Cfpuq'><dir id='Cfpuq'><q id='Cfpuq'></q></dir></style></legend>

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

    1. 如何在 Nodejs 中查找所有用户的 geoip 位置

      时间:2023-09-06

      <small id='Ns68t'></small><noframes id='Ns68t'>

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

                <bdo id='Ns68t'></bdo><ul id='Ns68t'></ul>
                本文介绍了如何在 Nodejs 中查找所有用户的 geoip 位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我有一个要求,我必须找到用户的 geoip 位置.我已经使用了将用户地址存储在数据库中的代码,然后显示该用户的 geoip 位置.现在假设用户将他的位置更改为其他地方.如果用户现在从该地区或国家登录,如何我应该显示该用户的 geoip.我使用的代码是:

                I have a requirement where i have to find the geoip location of the users. I have used the code where i store the address of the user in database and then display the geoip location of that user.Now suppose the users changed his location to some other place.If the user now logs in from that region or country, how should i display the geoip of that user. The code that i use is:

                geo.geocoder(geo.google, address, sensor,function(formattedAddress, latitude, longitude) {
                             console.log("Formatted Address: " + formattedAddress);
                             console.log("Latitude: " + latitude);
                             console.log("Longitude: " + longitude);
                             user.latitude = latitude;
                             user.longitude = longitude;
                             user.save(function(err) {
                               if(err)
                                 return userUpdateFailed();
                               req.flash('info', 'Succesfully Upadated Changes');
                               res.redirect('/userinfo');
                             });
                          });
                

                有没有其他方法可以找到用户的确切位置.请帮助

                Is there any alternative wherby i can be able to find the exact location of user.Please help

                推荐答案

                Node-GeoIP 可以是一种解决方案,但请记住,基于 ip 的地理定位并不总是真实的.

                Node-GeoIP could be a solution but keep in mind that ip-based geolocalization isn't always truthful.

                这篇关于如何在 Nodejs 中查找所有用户的 geoip 位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:Http 站点未检测到 Chrome 中的位置 - 问题 下一篇:有没有一种简单的方法可以确定用户在哪个半球

                相关文章

                最新文章

                <legend id='vnjjD'><style id='vnjjD'><dir id='vnjjD'><q id='vnjjD'></q></dir></style></legend>

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

                    <small id='vnjjD'></small><noframes id='vnjjD'>

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