Return to Snippet

Revision: 24638
at March 6, 2010 08:47 by metoikos


Initial Code
<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("Istanbul , 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(); 
    });

Initial URL

                                

Initial Description

                                

Initial Title
jquery google map init

Initial Tags
google, jquery

Initial Language
PHP