﻿ var map = null;
    var geocoder = null;

    function haritaOlustur(yer, boyut) {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("harita"));        
        
        map.addControl(new GOverviewMapControl()) ;
        map.addControl(new GSmallMapControl());        
        
        geocoder = new GClientGeocoder();
        
        if(yer){
        AdresGoster(yer,boyut);
        }
        else{
        map.setCenter(new GLatLng(39.10, 35.179), 6);
        }        
      }
    }

    function AdresGoster(adres,boyut) {
      if (geocoder) {
        geocoder.getLatLng(
          adres,
          function(point) {
            if (!point) {
              alert(adres + " not found!");
            } else {
              map.setCenter(point, boyut);
              map.panTo(center);
            }
          }
        );
      }
    }
function NormalHaritaGoster() {
map.setMapType(G_NORMAL_MAP);
}
function UyduHaritaGoster() {
map.setMapType(G_SATELLITE_MAP);
}
function HibridHaritaGoster() {
map.setMapType(G_HYBRID_MAP);
}
function FizikiHaritaGoster() {
map.setMapType(G_PHYSICAL_MAP);
}
