maptastic 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,7 +29,7 @@ To include the required javascripts put these two lines in your application.html
29
29
  <%= maptastic_provider_tag %>
30
30
  <%= javascript_include_tag 'maptastic' %>
31
31
 
32
- To finalize the installation please set your Google Maps API key in <tt>config/initializers/maptastic.rb</tt>
32
+ To finalize the installation please set your defaults in <tt>config/initializers/maptastic.rb</tt>
33
33
 
34
34
  == Configuration
35
35
 
@@ -37,7 +37,7 @@ To configure maptastic to your needs edit the <tt>config/initializers/maptastic.
37
37
 
38
38
  == Usage
39
39
 
40
- Read the API documentation at http://rdoc.info/projects/benedikt/maptastic
40
+ Read the API documentation at http://benedikt.github.com/maptastic/doc
41
41
 
42
42
  Examples (without markers):
43
43
 
@@ -1,7 +1,4 @@
1
1
  Maptastic.configure do |config|
2
- # Set this to your Google Maps API Key
3
- config.api_key = "PUT YOUR API KEY HERE"
4
-
5
2
  # Attribute to use to get the longitude of an object
6
3
  # Default: :longitude
7
4
  # config.longitude_attribute = :lng
@@ -2,12 +2,6 @@ require 'maptastic/railtie'
2
2
 
3
3
  module Maptastic
4
4
 
5
- ##
6
- # :singleton-method: api_key
7
- # Stores the application's Google Maps API key.
8
- mattr_accessor :api_key
9
- @@api_key = ""
10
-
11
5
  ##
12
6
  # :singleton-method: longitude_attribute
13
7
  # Gets the attribute name used to get the longitude of an object
@@ -1,3 +1,3 @@
1
1
  module Maptastic
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -1,4 +1,4 @@
1
1
  module Maptastic
2
- module ViewHelpers
2
+ module ViewHelpers # :nodoc:
3
3
  end
4
4
  end
@@ -7,8 +7,25 @@ module Maptastic
7
7
  #
8
8
  # Available options:
9
9
  #
10
- # *
10
+ # - :zoom -- Map zoom level
11
+ # - :controls -- Show UI controls (true / false)
12
+ # - :dragging -- Toggle dragging (true / false)
13
+ # - :zooming -- Toggle zooming (true / false)
14
+ # - :center -- Coordinate to center the map around
11
15
  #
16
+ # Examples (without markers):
17
+ #
18
+ # <%= maptastic :center => [37.4419, -122.1419] %>
19
+ # <%= maptastic :center => @poi %> # @poi.latitude and @poi.longitude are used
20
+ #
21
+ # Examples (with markers):
22
+ #
23
+ # <%= maptastic @poi %> # Simple marker without info window
24
+ # <%= maptastic @pois do |poi| %>
25
+ # Generates a marker with info window (bubble). Uses @poi.latitude and @poi.longitude
26
+ # to position the marker.
27
+ # <%= poi.name %>
28
+ # <% end %>
12
29
  def maptastic(*args, &block)
13
30
  options = args.extract_options!
14
31
 
@@ -27,6 +44,8 @@ module Maptastic
27
44
  content_tag(:div, marker_html_for(markers, &block), options)
28
45
  end
29
46
 
47
+ ##
48
+ # Includes the Google Maps API tag.
30
49
  def maptastic_provider_tag
31
50
  provider_url = "http://maps.google.com/maps/api/js?v=3".tap do |u|
32
51
  u << "&sensor=" + (Maptastic.sensor ? "true" : "false")
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maptastic
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Benedikt Deicke