dgapiclient The DGApiClient is a Yii Framework plugin that supply methods allowing you easily communicate with 2GIS API

DGApiClient Extension

  1. Requirements
  2. Installation
  3. Usage:
  4. Changelog:

DoubleGIS company presents Yii extensions. The DGApiClient is plugin that supply methods allowing you easily communicate with 2GIS API. Contains all methods described on http://api.2gis.ru/doc/main.

Requirements

Installation

'components' => array(
        ...
        'apiClient' => array(
           'class' => 'application.components.DGApiClient.DGApiClient',
           'apiKey' => 'YOUR_PERSONAL_KEY_HERE',
           'webBrowser'	=> 'webBrowser', // component name
        ),
        'webBrowser' => array( // DGWebBrowser 
           'class' => 'application.components.DGWebBrowser.DGWebBrowser',
           'adapter' => 'curl',
        ),
        ...
  • Enjoy!

Usage:

$apiClient = Yii::app()->getComponent('apiClient');

E.g. to recieve limited (to 10 records) list of geo-objects in radius one kilometer away from the point (82.901886, 54.991984) in XML format:

$list = $apiClient->geoSearch(array(
	'q' 		=> '82.901886,54.991984',
	'radius'	=> 1000,
	'limit'		=> 10,
	'output'	=> 'xml'
   ));

For detailed description of methods and their parameters see http://api.2gis.ru/doc/main/

Changelog:

  • 1.1 Fix bug with method project/list
  • 1.0 Initial release
8 0
2 followers
535 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Web Service
Tags: 2GIS, api
Developed by: a.spiridonov
Created on: Oct 13, 2011
Last updated: 6 years ago

Downloads

show all

Related Extensions