﻿var googleMap = null;

function initializeGoogleMap() {
  if (GBrowserIsCompatible()) {
    googleMap = new GMap2(elementById('googleMap'));
    googleMap.setCenter(new GLatLng(50.440951, 30.527181), 12);
  }
}

function addRecentParticipant(lat, lng, aHtml) {
  var point = new GLatLng(lat, lng);
  var icon = new GIcon(G_DEFAULT_ICON);

  icon.image = '/Images/RecentParticipant.png';
  icon.iconSize = new GSize(64, 48);
  icon.shadow = '/Images/RecentParticipant.Shadow.png';
  icon.shadowSize = new GSize(64, 48);
  icon.iconAnchor = new GPoint(18, 40);
  icon.infoWindowAnchor = new GPoint(22, 14);
  icon.imageMap = new Array(0, 0, 64, 0, 64, 48, 0, 48, 0, 0);

  var marker = new GMarker(point, { icon: icon });

  marker.bindInfoWindowHtml('<div class="infoWindow">' + aHtml + '</div>');
  googleMap.addOverlay(marker);
}