﻿/***************************************************
* Google maps API by Alen Purtic info@itrazvoj.com *
****************************************************/
// use with: <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
// in html: <body onload="initialize()"> <div id="map_canvas"></div> </body>

function initialize() {
  var myLatLng = new google.maps.LatLng(43.0084,17.2644);
  var myOptions = {
    zoom: 8,
    center: myLatLng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

  var hotel_faraon = new google.maps.MarkerImage('http://www.adriatiq-hotels.com/img/pin-faraon.png',
      // This marker is W pixels wide by H pixels tall.
      new google.maps.Size(77, 30),
      // The origin for this image is 0,0.
      new google.maps.Point(0,0),
      // The anchor for this image is the base of the flagpole
      new google.maps.Point(0, 30)
  );
  
  var hMarker = new google.maps.Marker({
    position: myLatLng,
    map: map,
    icon: hotel_faraon,
    title:"Hotel Faraon, Put Villa 2, Trpanj, Croatia. Tel: +385 (0)20 743 408"
  });

  google.maps.event.addListener(hMarker, 'click', function() {
    map.setCenter(myLatLng);
    map.setZoom(12);
  });


}
