Skip to content

Latest commit

 

History

History
82 lines (59 loc) · 1.89 KB

installation.md

File metadata and controls

82 lines (59 loc) · 1.89 KB

Installation

If you use the geocoding API, you need to install Geocoder which is a PHP 5.3 library for issuing Geocoding and his dependencies (Buzz or other adapters).

Add respectively Buzz|Geocoder & IvoryGoogleMapBundle to your vendor/ & vendor/bundles/ directories

Using composer

Add IvoryGoogleMapBundle in your composer.json:

{
    "require": {
        "egeloen/google-map-bundle": "*"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update egeloen/google-map-bundle

Using the vendors script

Add the following lines in your deps file

[buzz]
    git=http://github.com/kriswallsmith/Buzz.git

[geocoder]
    git=http://github.com/willdurand/Geocoder.git

[IvoryGoogleMapBundle]
    git=http://github.com/egeloen/IvoryGoogleMapBundle.git
    target=/bundles/Ivory/GoogleMapBundle

Run the vendors script

./bin/vendors update

Using submodules

$ git submodule add http://github.com/kriswallsmith/Buzz.git vendor
$ git submodule add http://github.com/willdurand/Geocoder.git vendor
$ git submodule add http://github.com/egeloen/IvoryGoogleMapBundle.git vendor/bundles/Ivory/GoogleMapBundle

Add Buzz, Geocoder & Ivory namespaces to your autoloader

<?php
// app/autoload.php

$loader->registerNamespaces(array(
    'Buzz'     => __DIR__.'/../vendor/buzz/lib',
    'Geocoder' => __DIR__.'/../vendor/geocoder/src',
    'Ivory'    => __DIR__.'/../vendor/bundles',
    // ...
);

Add the IvoryGoogleMapBundle to your application kernel

<?php
// app/AppKernel.php

public function registerBundles()
{
    return array(
        new Ivory\GoogleMapBundle\IvoryGoogleMapBundle(),
        // ...
    );
}

Next: Usage