I added the javascript needed to load the google maps into my page:
<% content_for :head do %>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=API_KEY&sensor=false">
</script>
<script type="text/javascript">
function initialize() {
var mapOptions = {
center: new google.maps.LatLng(<%=@lat%>, <%=@lon%>),
zoom: 5,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
mapOptions);
}
</script>
<% end %>
as you can see i need to pass the parameters latitude and longitude when i load the map. As i said in the title i want to put these javascripts into the asset pipeline, is it possible if yes how ? thanks