Right-to-Left Languages

View this example full screen.

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&signed_in=true&language=ar&callback=initMap"></script>
JavaScript
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>
      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&signed_in=true&language=ar&callback=initMap"></script>
  </body>
</html>

Send feedback about...

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