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

Version Path
kit_cms-2.3.22 app/views/utility/_map.html.haml
kit_cms-2.3.20 app/views/utility/_map.html.haml
kit_cms-2.3.19 app/views/utility/_map.html.haml
kit_cms-2.3.18 app/views/utility/_map.html.haml
kit_cms-2.3.17 app/views/utility/_map.html.haml
kit_cms-2.3.16 app/views/utility/_map.html.haml
kit_cms-2.3.15 app/views/utility/_map.html.haml
kit_cms-2.3.14 app/views/utility/_map.html.haml
kit_cms-2.3.13 app/views/utility/_map.html.haml
kit_cms-2.3.11 app/views/utility/_map.html.haml
kit_cms-2.3.10 app/views/utility/_map.html.haml
kit_cms-2.3.9 app/views/utility/_map.html.haml
kit_cms-2.3.8 app/views/utility/_map.html.haml
kit_cms-2.3.7 app/views/utility/_map.html.haml
kit_cms-2.3.6 app/views/utility/_map.html.haml