Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
updating readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Hopkins committed Feb 11, 2015
1 parent 134df21 commit ec35b19
Showing 1 changed file with 37 additions and 6 deletions.
43 changes: 37 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,44 @@
## Phpgmaps
A none CI implementation of BIOINSTALL's [CodeIgniter library](http://github.com/BIOSTALL/CodeIgniter-Google-Maps-V3-API-Library).

### Overview
---

I found this library to be incredibly useful when I was working in CodeIgniter. However a little bit of work needed to be done to use it in a Laravel project. I can't take any of the credit for the actual "heavy lifting" going on in the class.

### Installation
1. Include the package in your composer.json file `"appitventures/phpgmaps": "dev-master",`
2. Add `'Appitventures\Phpgmaps\PhpgmapsServiceProvider',` to app.config
3. Add `'Gmaps' => 'Appitventures\Phpgmaps\Facades\Phpgmaps',` to your facade list
---

[![Latest Stable Version](https://poser.pugx.org/appitventures/phpgmaps/v/stable.svg)](https://packagist.org/packages/appitventures/phpgmaps)
[![Total Downloads](https://poser.pugx.org/appitventures/phpgmaps/downloads.svg)](https://packagist.org/packages/appitventures/phpgmaps)
[![Monthly Downloads](https://poser.pugx.org/appitventures/phpgmaps/d/monthly.png)](https://packagist.org/packages/appitventures/phpgmaps)
[![License](https://poser.pugx.org/appitventures/phpgmaps/license.svg)](https://packagist.org/packages/appitventures/phpgmaps)

#Installation

Add this package in your `composer.json` and update composer.

For Laravel 4.\* use the below line. Please be aware that I only have the time to support the latest stable release of Laravel. So any future updates (features, security, or otherwise) will not be applied to the branch for laravel4 compatibility

```php
"appitventures/phpgmaps": "1.0.*@dev"
```

For Laravel 5.\* use the below line

```php
"appitventures/phpgmaps": "2.0.*@dev"
```

After updating composer, add the ServiceProvider to the providers array in `app/config/app.php`

```php
'Appitventures\Phpgmaps\PhpgmapsServiceProvider',
```

And the Facade

```php
'Gmaps' => 'Appitventures\Phpgmaps\Facades\Phpgmaps',
```

### Example
The following code will prompt the user for access to their geolocation and then creates a map centered on their lat/lng
Expand All @@ -31,7 +62,7 @@ The following code will prompt the user for access to their geolocation and then
Gmaps::add_marker($marker);

$map = Gmaps::create_map();
echo "<html><head>".$map['js']."</head><body>".$map['html']."</body></html>";
echo "<html><head><script type="text/javascript">var centreGot = false;</script>".$map['js']."</head><body>".$map['html']."</body></html>";
});

### More Examples
Expand Down

0 comments on commit ec35b19

Please sign in to comment.