lib/gmaps4rails/helper/gmaps4rails_helper.rb
# full helper to pass all variables and their options
# @params [Hash] options is a Hash containing data and options. Example: { markers:{ data: @json, options: { do_clustering: true } } }
full helper to pass all variables and their options
full helper to pass all variables and their options
def gmaps(options)
    options_with_indifferent_access = options.with_indifferent_access
    view_helper                     = Gmaps4rails::ViewHelper.new(options_with_indifferent_access)
    if include_gmaps4rails_api_in_header?
      js_dependencies = []
    else
      js_dependencies = if Gmaps4rails.escape_js_url
                          view_helper.js_dependencies_array
                        else
                          view_helper.js_dependencies_array.map(&:html_safe)
                        end
    end
    render :partial => '/gmaps4rails/gmaps4rails', 
           :locals  => { 
             :options         => options_with_indifferent_access, 
             :js_dependencies => js_dependencies,
             :dom             => view_helper.dom_attributes
            }
  end
def gmaps ( options ) options_with_indifferent_access = options . with_indifferent_access view_helper = Gmaps4rails :: ViewHelper . new ( options_with_indifferent_access ) if include_gmaps4rails_api_in_header? js_dependencies = [ ] else js_dependencies = if Gmaps4rails . escape_js_url view_helper . js_dependencies_array else view_helper . js_dependencies_array . map ( & :html_safe ) end end render :partial => '/gmaps4rails/gmaps4rails' , :locals => { :options => options_with_indifferent_access , :js_dependencies => js_dependencies , :dom => view_helper . dom_attributes } end
full helper to pass all variables and their options
full helper to pass all variables and their options
options
<not_specific>
params
[Hash] options is a Hash containing data and options. Example: { markers:{ data: @json, options: { do_clustering: true } } }
[ Hash ] options is a Hash containing data and options . Example : { markers : { data : @json options : { do_clustering : true } } }