You're all set!

To start developing, please head over to our developer documentation.

Activate the Google Maps JavaScript API

To get you started we'll guide you through the Google Developers Console to do a few things first:

  1. Create or choose a project
  2. Activate the Google Maps JavaScript API and related services
  3. Create appropriate keys
Continue

Right-to-Left Languages

Read the documentation or view this example full screen.

// This example displays a map with the language set to Arabic and the
// regions set to Egypt. These settings are specified in the HTML script
// element when loading the Google Maps JavaScript API.
// Setting the language shows the map in the language of your choice.
// Setting the region biases the geocoding results to that region.
// In addition, the page's html element sets the text direction to
// right-to-left.
function initMap() {
  var cairo = {lat: 30.064742, lng: 31.249509};

  var map = new google.maps.Map(document.getElementById('map'), {
    scaleControl: true,
    center: cairo,
    zoom: 10
  });

  var infowindow = new google.maps.InfoWindow;
  infowindow.setContent('<b>القاهرة</b>');

  var marker = new google.maps.Marker({map: map, position: cairo});
  marker.addListener('click', function() {
    infowindow.open(map, marker);
  });
}
<div id="map"></div>
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
#map {
  height: 100%;
}
<!-- Replace the value of the key parameter with your own API key. -->
<script async defer
    src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCkUOdZ5y7hMm0yrcCQoCvLwzdM6M8s5qk&language=ar&region=EG&callback=initMap"></script>
JavaScript
// This example displays a map with the language set to Arabic and the
// regions set to Egypt. These settings are specified in the HTML script
// element when loading the Google Maps JavaScript API.
// Setting the language shows the map in the language of your choice.
// Setting the region biases the geocoding results to that region.
// In addition, the page's html element sets the text direction to
// right-to-left.
function initMap() {
  var cairo = {lat: 30.064742, lng: 31.249509};

  var map = new google.maps.Map(document.getElementById('map'), {
    scaleControl: true,
    center: cairo,
    zoom: 10
  });

  var infowindow = new google.maps.InfoWindow;
  infowindow.setContent('<b>القاهرة</b>');

  var marker = new google.maps.Marker({map: map, position: cairo});
  marker.addListener('click', function() {
    infowindow.open(map, marker);
  });
}
JavaScript + HTML
<!DOCTYPE html>
<html dir="rtl">
  <head>
    <title>Right-to-Left Languages</title>
    <meta charset="utf-8">
    <style>
      html, body {
        height: 100%;
        margin: 0;
        padding: 0;
      }
      #map {
        height: 100%;
      }
    </style>
  </head>
  <body>
    <div id="map"></div>
    <script>
      // This example displays a map with the language set to Arabic and the
      // regions set to Egypt. These settings are specified in the HTML script
      // element when loading the Google Maps JavaScript API.
      // Setting the language shows the map in the language of your choice.
      // Setting the region biases the geocoding results to that region.
      // In addition, the page's html element sets the text direction to
      // right-to-left.
      function initMap() {
        var cairo = {lat: 30.064742, lng: 31.249509};

        var map = new google.maps.Map(document.getElementById('map'), {
          scaleControl: true,
          center: cairo,
          zoom: 10
        });

        var infowindow = new google.maps.InfoWindow;
        infowindow.setContent('<b>القاهرة</b>');

        var marker = new google.maps.Marker({map: map, position: cairo});
        marker.addListener('click', function() {
          infowindow.open(map, marker);
        });
      }
    </script>
    <script async defer
    src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&language=ar&region=EG&callback=initMap"></script>
  </body>
</html>

Send feedback about...

Google Maps JavaScript API
Google Maps JavaScript API
Need help? Visit our support page.