PHPackages                             ovidiupop/yii2-nordicgeo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ovidiupop/yii2-nordicgeo

ActiveYii2-extension[API Development](/categories/api)

ovidiupop/yii2-nordicgeo
========================

Yii2-NordicGeo is a robust Yii2 component designed for seamless integration with geographical APIs in the Nordic countries.

071PHP

Since Jan 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ovidiupop/yii2-nordicgeo)[ Packagist](https://packagist.org/packages/ovidiupop/yii2-nordicgeo)[ RSS](/packages/ovidiupop-yii2-nordicgeo/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 NordicGeo
==============

[](#yii2-nordicgeo)

Yii2-NordicGeo is a robust Yii2 component designed for seamless integration with geographical APIs in the Nordic countries.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require --prefer-dist ovidiupop/yii2-nordicgeo "~1.0"

```

or add

```
"ovidiupop/yii2-nordicgeo": "~1.0"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, integrate the NordicGeo component into your Yii2 application by configuring it in config.php. Harness the power of APIs from the nordic-geo.com:

```
'components' => [
    'nordicgeo' => [
        'class' => 'ovidiupop\nordicgeo\NordicGeo',
        'apisBaseUrl' => 'http://nordic-geo.com/',
        'queryBaseUrl' => 'http://nordic-geo.com/api/query?type=',
    ],
    ............
],

'controllerMap' => [
    'nordicgeo'=> 'ovidiupop\nordicgeo\controllers\NordicGeoController',
    ............
]
```

To use autocompletion with dependent data in a form, you need to add specific classes for each field.
These are:
'geography-select country' - pentru select2 country
'geography-select.region' - pentru select2 region
'geography-select place' pentru select2 city
'geography-select postalcode' - pentru select2 postal code

```
