// Mapa inwestycji

baseIcon = new GIcon(G_DEFAULT_ICON);
baseIcon.iconSize = new GSize(22, 29);
baseIcon.shadowSize = new GSize(50, 27);
baseIcon.iconAnchor = new GPoint(22, 29);
baseIcon.infoWindowAnchor = new GPoint(11, 29);

Dzielnice = {
  102: {'GLL': new GLatLng(50.087216839714856,20.030221939086914), 'Zoom': 14},
  103: {'GLL': new GLatLng(50.014688926824654,20.022239685058594), 'Zoom': 13},
  104: {'GLL': new GLatLng(50.083582032198564,19.87323760986328),  'Zoom': 13},
  105: {'GLL': new GLatLng(50.063750956995094,20.013484954833984),  'Zoom': 13},
  106: {'GLL': new GLatLng(50.049588755156975,19.921045303344727),  'Zoom': 14},
  107: {'GLL': new GLatLng(50.06364076144622,19.975547790527344),  'Zoom': 13},
  108: {'GLL': new GLatLng(50.08776754408083,19.924650192260742),  'Zoom': 14},
  109: {'GLL': new GLatLng(50.017887754949065,19.91872787475586),  'Zoom': 13},
  110: {'GLL': new GLatLng(50.098119608470014,20.006532669067383),  'Zoom': 14},
  111: {'GLL': new GLatLng(50.07697258506332,20.022926330566406),  'Zoom': 13},
  112: {'GLL': new GLatLng(50.03685573785988,20.006103515625),  'Zoom': 12},
  113: {'GLL': new GLatLng(50.00641510788486,19.971084594726562),  'Zoom': 12},
  114: {'GLL': new GLatLng(50.09481600110869,19.91374969482422),  'Zoom': 12},
  115: {'GLL': new GLatLng(50.078074222866334,19.9676513671875),  'Zoom': 12},
  116: {'GLL': new GLatLng(50.05691835425775,19.942588806152344),  'Zoom': 13},
  117: {'GLL': new GLatLng(49.98257855035742,19.952545166015625),  'Zoom': 13},
  118: {'GLL': new GLatLng(50.10395542480125,20.093994140625),  'Zoom': 13},
  119: {'GLL': new GLatLng(50.056477507761564,19.86431121826172),  'Zoom': 12}
};

function ChangeLocation(D) {
  map.setCenter(Dzielnice[D].GLL, Dzielnice[D].Zoom);
}

function SHMarker(e, id, count) {
  e.blur();
  if(e.checked) {
  for(i=0; i<count; i++) {
    m = "__"+id+"_"+i+".show();";
    eval(m);
  }
  } else {
  for(i=0; i<count; i++) {
    m = "__"+id+"_"+i+".hide();";
    eval(m);
  }
  }
}

function createMarker(point, icon, text, zoom, url) {
  letteredIcon = new GIcon(baseIcon);
  letteredIcon.image = icon;
  markerOptions = { icon:letteredIcon };
  url = "http://www.dialogspoleczny.krakow.pl"+url;
  text += "<br/><a href=\""+url+"\">Zobacz szczegóły inwestycji</a>";
  var marker = new GMarker(point, markerOptions);
  GEvent.addListener(marker, "click", function() {
    map.setCenter(point, zoom);
    marker.openInfoWindowHtml(text);
  });
  return marker;
}

function Initialize() {
  if(GBrowserIsCompatible()) {

    map = new GMap2(document.getElementById("googlemap"));
    map.setCenter(new GLatLng(50.06948077670394,19.940872192382812), 11);
    map.enableScrollWheelZoom()
    map.addControl(new GSmallMapControl());
    map.addControl(new GOverviewMapControl());
  }
}

