1

بابه‌ت: کێشە لە بە کار هێنانی نەخشەی گۆگڵ

سلاو من پەرەیەکم هەیە دەمەوێت
دوو نەخشی گۆگڵ یان زایاتری لێ دانێم بەڵام تەنیا یەک
نەخشە کار دەکات چۆن وای لێبکەم زیاتر لەیەک نەخشە کار بکات ئەمە کۆدی نەخشە کە

  <script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
    <script>
var geocoder;
var map;
var query = 'erbil';
function initialize() {
  geocoder = new google.maps.Geocoder();
  var mapOptions = {
    zoom: 17
  }
  map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
  codeAddress();
}

function codeAddress() {
  var address = query;
  geocoder.geocode( { 'address': address}, function(results, status) {
    if (status == google.maps.GeocoderStatus.OK) {
      map.setCenter(results[0].geometry.location);
      var marker = new google.maps.Marker({
          map: map,
          position: results[0].geometry.location
      });
    } else {
      alert('Geocode was not successful for the following reason: ' + status);
    }
  });
}

google.maps.event.addDomListener(window, 'load', initialize);

    </script>

کۆدئ html

 <body>
    <div id="map-canvas"></div>
    
    <div id="map-canvas"></div>
    
  </body>

ئەوها نیشان دەدات

http://www.webchinupload.com/f/2014-07/8befdf60360da3e5371cb3a5cf15421a.JPG


ئەوە هەموو کۆدەکە

<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="utf-8">
    <title>Region code biasing (US)</title>
    <style>
      html, body, #map-canvas {
        height: 400px;
        width:500px;
        margin: 0px;
        padding: 0px
      }
      
       html, body, #map-canvas {
        height: 400px;
        width:500;
        margin: 0px;
        padding: 0px
      }
    </style>
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
    <script>
var geocoder;
var map;
var query = 'erbil';
function initialize() {
  geocoder = new google.maps.Geocoder();
  var mapOptions = {
    zoom: 17
  }
  map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
  codeAddress();
}

function codeAddress() {
  var address = query;
  geocoder.geocode( { 'address': address}, function(results, status) {
    if (status == google.maps.GeocoderStatus.OK) {
      map.setCenter(results[0].geometry.location);
      var marker = new google.maps.Marker({
          map: map,
          position: results[0].geometry.location
      });
    } else {
      alert('Geocode was not successful for the following reason: ' + status);
    }
  });
}

google.maps.event.addDomListener(window, 'load', initialize);

    </script>
    
    
      <script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
    <script>
var geocoder;
var map;
var query = 'sultan muthafar';
function initialize() {
  geocoder = new google.maps.Geocoder();
  var mapOptions = {
    zoom: 17
  }
  map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
  codeAddress();
}

function codeAddress() {
  var address = query;
  geocoder.geocode( { 'address': address}, function(results, status) {
    if (status == google.maps.GeocoderStatus.OK) {
      map.setCenter(results[0].geometry.location);
      var marker = new google.maps.Marker({
          map: map,
          position: results[0].geometry.location
      });
    } else {
      alert('Geocode was not successful for the following reason: ' + status);
    }
  });
}

google.maps.event.addDomListener(window, 'load', initialize);

    </script>
    
  </head>
  <body>
    <div id="map-canvas"></div>
    
    <div id="map-canvas"></div>
    
  </body>
</html>

2

وه‌ڵام: کێشە لە بە کار هێنانی نەخشەی گۆگڵ

<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="utf-8">
    <title>Region code biasing (US)</title>
    <style>
      html, body, #map-canvas {
        height: 400px;
        width:500px;
        margin: 0px;
        padding: 0px
      }
      
       html, body, #map-canvas2 {
        height: 400px;
        width:500;
        margin: 0px;
        padding: 0px
      }
    </style>
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
    <script>
var geocoder;
var map;
var query = 'erbil';
function initialize() {
  geocoder = new google.maps.Geocoder();
  var mapOptions = {
    zoom: 17
  }
  map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
  codeAddress();
}


function codeAddress() {
  var address = query;
  geocoder.geocode( { 'address': address}, function(results, status) {
    if (status == google.maps.GeocoderStatus.OK) {
      map.setCenter(results[0].geometry.location);
      var marker = new google.maps.Marker({
          map: map,
          position: results[0].geometry.location
      });
    } else {
      alert('Geocode was not successful for the following reason: ' + status);
    }
  });
}


var geocoder;
var map2;
var query2 = 'sultan muthafar';
function initialize2() {
  geocoder = new google.maps.Geocoder();
  var mapOptions = {
    zoom: 17
  }
  map2 = new google.maps.Map(document.getElementById('map-canvas2'), mapOptions);
  codeAddressB();
}
function codeAddressB() {
  var address2 = query2;
  geocoder.geocode( { 'address': address2}, function(results, status) {
    if (status == google.maps.GeocoderStatus.OK) {
      map2.setCenter(results[0].geometry.location);
      var marker2 = new google.maps.Marker({
          map: map2,
          position: results[0].geometry.location
      });
    } else {
      alert('Geocode was not successful for the following reason: ' + status);
    }
  });
}

google.maps.event.addDomListener(window, 'load', initialize2);

    </script>

    
  </head>
  <body onload="initialize()">
  <p>
<div id="map-canvas"></div>
<div id="map-canvas2"></div>
    
  </body>
</html>
هیچ شتێك ئه‌وه‌نده‌ باش نییه‌ نه‌توانرێت باشتر بكرێت :::http://webdarej.com

3

وه‌ڵام: کێشە لە بە کار هێنانی نەخشەی گۆگڵ

کاکە ئاسۆ ئەو کۆدەم لەناو پەرەیەکی ئاسای html م دانا کێشەی نیە کار دەکات
بەڵام کە لە پرۆژەکەی خۆم کاری پێدەکام کار ناکات  ئەگەر بکرێت چاوێکی لێ بکەی
بە پەیامی تای بەت بۆتی دە نێرم