Download the PHP package streltcov/yandex-geocoder without Composer

On this page you can find all versions of the php package streltcov/yandex-geocoder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yandex-geocoder

testing; stable enough, but may have minor bugs;

Installation

via Composer:

composer require streltcov/yandex-geocoder

Basic usage

Performs request to Yandex Geocoder and provides fluent interface for GeoObject selection


Getting all results found in geocollection:

<?php

use streltcov\YandexUtils\GeoCoder;

// returns array of GeoObjects (numeration begins from 0)
$response = GeoCoder::search($address)->all();

Getting single GeoObject:

<?php

use streltcov\YandexUtils\GeoCoder;

// returns first instance if number is not specified
$geoobject = GeoCoder::search($address)->one();

// returns GeoObject with specified number (numeration from 0)
$geoobject = GeoCoder::search($address)->one(1);
// returns 5 element in geoobjects array
$response = GeoCoder::search($address)->one(5);

Getting GeoObject with exact precision:

// exact()
// returns GeoObject with precision property set to exact
$response = GeoCoder::search($address)->exact();

// searching geocontext with coordinates
// will return first instance in geoobjects array
$response = GeoCoder::searchPoint($coordinates)->one();

// parameters:
// may be set globally by GeoCoder methods setLocality, setKind and SetSkip
// or in array for single request
// skip parameter:
GeoCoder::setSkip(10); // setting globally for all requests
$response = GeoCoder::search($address)->all(); // will skip first 10 results and return next 10
$response = GeoCoder::search($address, ['skip' => 10])->all(); // the same for single request

// parameters 'skip' and 'lang' will be used in both cases (searching address or coordinates)
// parameter 'kind' will be applied only for point coordinates;

Parameters:

Three parameters available - skip, kind and locality

Parameters can be set globally (for all requests) or locally (for single request)

Public methods

GeoCoder:

Static methods:


GeoCollection:

Basic:

Geo objects selection fluent interface:


GeoObject:


Available parameter values:

Kinds:

    'house',
    'street',
    'metro',
    'district',
    'locality',
    'province',
    'country',
    'hydro'

    (other values will be ignored)

Locality:

    'RU' => russian
    'US' => english (american)
    'EN' => english
    'UA' => ukrainian
    'BY' => belorussian
    'TR' => turkish

    (other values will be ignored)

Examples:

// the following request will set locale to en_US, skip first 5 results, return GeoObjects with kind = metro and
// select objects with indexes 0, 1 and 2
$response = GeoCoder::searchPoint($coordinates, ['kind'=> 'metro', 'skip' => 5, 'lang' => 'US'])
->select(['id' => [0, 1, 2]])
->all();

All versions of yandex-geocoder with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package streltcov/yandex-geocoder contains the following files

Loading the files please wait ....