I am new on ruby. I want to know that how can I store multiple markers in database using google maps. I want to store values of longitude and latitude in single attributes in database.
This is my controller code for storing single values in database from markers
@product.latitude = params[:product]['latitude']
@product.longitude = params[:product]['longitude']
This is my javascript for map
google.maps.event.addListener(map, 'click', function (evt) {
var location = evt.latLng
placeMarker(location);
$("#product_latitude").val(location.lat());
$("#product_longitude").val(location.lng());
});