Showing posts with label google maps. Show all posts
Showing posts with label google maps. Show all posts

Saturday, March 6, 2010

Google Maps Api : Adresten haritaya

<!-- Açıklama yaz :) -->

 <script src="http://maps.google.com/maps?file=api&v=2&key=ApiKeyinizBurayaYazılacak&sensor=true"
        type="text/javascript"></script>
       
    <script type="text/javascript">
 var geocoder;
 var map; 
 function initialize() {
 var geocoder = new GClientGeocoder();
 var map = new GMap2(document.getElementById("map_canvas"));
   geocoder.getLocations("Ankara , TURKEY", function(result){
          if (result.Status.code != 200) {
            alert('Could not geocode "' + result.name + '"');
            return;
        }
          place = result.Placemark[0];
          point = new GLatLng(place.Point.coordinates[1],
                              place.Point.coordinates[0]);
          map.setMapType(G_HYBRID_MAP);
          map.setCenter(point, 8);
          marker = new GMarker(point);
         map.addOverlay(marker);
         alert("OK");
          marker.openInfoWindowHtml(place.address);
    
   });
 
 }
  
    $(document).ready(function(){
     initialize(); 
    });

    </script>


Konuyu irdeleyin:
geocoder.getLocations : 
 - http://www.google.com.tr/search?hl=tr&rlz=1C1GGLS_trTR355TR355&q=geocoder.getLocations&btnG=Ara&meta=&aq=f&oq=
http://www.developer.com/tech/article.php/3615681/Introducing-Googles-Geocoding-Service
google maps api ref. : 
http://code.google.com/apis/maps/documentation/reference.html

Friday, September 11, 2009

Hızlı Yol Tarifi Formu

TAVSİYE EDİYORUM

Eğer oldukça pratik bir şekilde google maps yol tarifi vermek isteseydim bir form koyardım ve bu formu google maps e post eylerdim. Şöyle ki:

<form action="http://maps.google.com/maps" method="get">
   Konum <input type="text" id="saddr" name="saddr" />
   <input type="hidden" id="daddr" name="daddr" value="Ankara, Türkiye" />
   <input type="submit" value="Yol Tarifi Al" />
</form>


İsterseniz hemen deneyin:

Konum