Skip to content
This repository was archived by the owner on Mar 3, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ output directory.
## Usage ##

Currently, bhm-google-maps is designed to show a single map w/ static fallback. To do this,
you use the `draw_map_of` helper. You pass it an object you wish to plot, typically following the
you use the `gmap` helper. You pass it an object you wish to plot, typically following the
convention that:

1. `object.lat` and `object.lng` return latitude / longitude respectively
Expand All @@ -55,9 +55,9 @@ class demo:

Then, in your view, you could simple call:

<%= draw_map_of Location.new("My House", 12.345, 56.789) %>
<%= gmap Location.new("My House", 12.345, 56.789) %>

Optionally, `draw_map_of` accepts a hash of options for:
Optionally, `gmap` accepts a hash of options for:

* `:static_map_html` - options to pass to the image\_tag for the static map.
* `:static_map` - options to pass to the BHM::GoogleMaps::StaticMap constructor. These include `:type`, `:width` and `:height`
Expand Down
2 changes: 1 addition & 1 deletion lib/bhm/google_maps/builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module GoogleMaps
class Location
def initialize(object)
@lat, @lng = BHM::GoogleMaps.address_to_lat_lng_proc.call(object)
@address = BHM::GoogleMaps.address_to_s_proc.call(@address)
@address = BHM::GoogleMaps.address_to_s_proc.call(object)
end
attr_reader :lat, :lng, :address
end
Expand Down