beyondthestory / rails_admin_map_field

A plugin for RailsAdmin to provide a Google Maps input for lat/long fields
40 stars 73 forks source link

-Reordering the div position to be in the beginning of the file before t... #8

Open minakolta opened 11 years ago

minakolta commented 11 years ago

Using the map field raised an error in the first load of the partial "google is not defined". i had to refresh the page to get the map shown as the js files from google are already loaded, I had to modify the app / views / rails_admin / main / _form_map.html.haml to place the div element

%div.ramf-map-container{:id => field.dom_name, :style => "width:300px;height:200px"}
= form.send :hidden_field, field.name, :id => field.latitude_dom_name
= form.send :hidden_field, field.longitude_field, :id => field.longitude_dom_name

to the beginning of the file before loading the js