diff --git a/README.md b/README.md index 8c1ddc0..1865046 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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` diff --git a/lib/bhm/google_maps/builder.rb b/lib/bhm/google_maps/builder.rb index ac072fc..d26daca 100644 --- a/lib/bhm/google_maps/builder.rb +++ b/lib/bhm/google_maps/builder.rb @@ -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