Sha256: 0d601fd65d31e45171eb81345303cf7f20c65b81fbf60dd7d9227ba870cb7290

Contents?: true

Size: 1.46 KB

Versions: 1

Compression:

Stored size: 1.46 KB

Contents

# Cartographie

[![Build Status](https://secure.travis-ci.org/mattonrails/cartographie.png?branch=master)](http://travis-ci.org/mattonrails/cartographie)
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/mattonrails/cartographie)

Cartographie is a wrapper for Google's Static Maps API, but it can support your
own custom API, too!

## Installation

Add this line to your application's Gemfile:

    gem 'cartographie'

Or install it yourself as:

    $ gem install cartographie

## Usage

```ruby
require 'cartographie'
Cartographie.map('San Francisco, CA')
Cartographie.map('New York, NY', width: 200, height: 200, zoom: 10)
```

**Configuration**

```ruby
Cartographie.configure do |config|
  config.api_endpoint = 'http://example.com/api/map'
  config.width = 640
  config.height = 640
  config.zoom = 12
  config.file_format = 'jpg'
  config.sensor = true
end
```

**Defaults**

If you do not pass options when generating a map, nor configure a map attribute
using the configuration block, the following values will be used:

- api endpoint: 'http://maps.googleapis.com/maps/api/staticmap'
- width: 300
- height: 300
- zoom: 15
- format: 'png'
- sensor: false

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## Thanks

- @nurugger07
- @mattpolito
- @bthesorceror

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cartographie-0.0.3 README.md