Giter Site home page Giter Site logo

node-multi-geocoder's People

Contributors

dimik avatar ifokeev avatar nokrasnov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-multi-geocoder's Issues

Не работает пример

Код:

var MultiGeocoder = require('multi-geocoder'),
    geocoder = new MultiGeocoder({ provider: 'yandex-cache', coordorder: 'latlong' });

geocoder.geocode(['Moscow', 'New York', 'Paris', 'London'])
.then(function (res) {
    console.log(res);
});

Текст ошибки:

/home/ubuntu/workspace/node_modules/multi-geocoder/lib/providers/yandex/geojson-view.js:17
            throw new Error('GeoObject Not Found');
            ^

Error: GeoObject Not Found
    at module.exports.inherit.toGeoJSON (multi-geocoder/lib/providers/yandex/geojson-view.js:17:19)
    at module.exports.inherit.process (multi-geocoder/lib/providers/yandex/geocode-provider.js:12:21)
    at .<anonymous> (multi-geocoder/lib/providers/base-geocode-provider.js:38:24)
    at Request.callback (superagent/lib/node/index.js:591:12)
    at superagent/lib/node/index.js:766:18
    at Stream.<anonymous> (superagent/lib/node/parsers/json.js:16:7)
    at emitNone (events.js:86:13)
    at Stream.emit (events.js:185:7)
    at Unzip.<anonymous> (superagent/lib/node/utils.js:108:12)
    at emitNone (events.js:91:20)

Found 2 vulnerabilities, please fix it

npm audit
=== npm audit security report ===

                             Manual Review
         Some vulnerabilities require your attention to resolve

      Visit https://go.npm.me/audit-guide for additional guidance

Low Prototype Pollution

Package lodash

Patched in >=4.17.5

Dependency of multi-geocoder

Path multi-geocoder > lodash

More info https://nodesecurity.io/advisories/577

Low Large gzip Denial of Service

Package superagent

Patched in >=3.7.0

Dependency of multi-geocoder

Path multi-geocoder > superagent

More info https://nodesecurity.io/advisories/479

found 2 low severity vulnerabilities in 34170 scanned packages
2 vulnerabilities require manual review. See the full report for details.

Как получить больше 1го результата на 1 запрос?

Например, Минск, Калинина 1. Яндекс отвечает улица Калинина 1 и переулок Калинина 1.
toGeoJSON работает только с первым результатом.

Можно конечно просто делать запросы в Яндекс, но очень нравится yandex-cache провайдер

ошибка "модуль не найден"

пожалуйста, замените динамическое подключение require('./' + provider + '/geocode-provider'); на явное указаное путей. Иначе после компиляции через browserify выдает ошибку что, модуль не найден

[SOLVED] Как получить результат по координатам?

При отработке кода

var getRequestParams = provider.getRequestParams;
    provider.getRequestParams = function() {
      var result = getRequestParams.apply(provider, arguments);
      result.key = process.env.YANDEX_MAPS_API_KEY;
      return result;
    };
    geocoder
      .geocode(
        [
          [myLongitude, myLatitude]
        ],
        {
          json: true
        }
      )
      .then(function(res) {
        console.log(JSON.stringify(res));
      });

Получаю ответ

{"result":{"type":"FeatureCollection","features":[]},"errors":[{"request":[61.79,34.36],"index":0,"reason":"GeoObject Not Found"}]}

Как правильно задать request строку?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.