Sha256: 32d48c3a9de980e5b31b81931ffee69ee3c5da44e7cbef596e3dfe2a32aa091e
Contents?: true
Size: 893 Bytes
Versions: 15
Compression:
Stored size: 893 Bytes
Contents
- content_for :page_scripts do function initialize() { var geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(55,0); geocoder.geocode({'address':'#{location}'},function(results,status) { latlng = results[0].geometry.location; var options = {zoom: 14, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP}; var map = new google.maps.Map(document.getElementById("map"), options); var marker = new google.maps.Marker({ position: latlng, map: map, title:"#{title}" }); }); } $(document).ready(function() { var script = document.createElement("script"); script.type = "text/javascript"; script.src = "http://maps.googleapis.com/maps/api/js?key=#{Preference.getCached(_sid, 'google_api_browser_key')}&sensor=false&callback=initialize"; document.body.appendChild(script); }); #map(style="height: #{height}px; width: #{width}px;")
Version data entries
15 entries across 15 versions & 1 rubygems