1

First time implementing Google Maps/Street View, side-by-side into a webpage.

Which API Key do I need please?

Source Link:
https://developers.google.com/maps/documentation/javascript/examples/streetview-simple

See below, it ask for a personal API key, once again which API key do I need?

Example:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Street View side-by-side</title>
    <style>
      html, body {
        height: 100%;
        margin: 0;
        padding: 0;
      }
      #map, #pano {
        float: left;
        height: 100%;
        width: 45%;
      }
    </style>
  </head>
  <body>
    <div id="map"></div>
    <div id="pano"></div>
    <script>

function initialize() {
  var fenway = {lat: 42.345573, lng: -71.098326};
  var map = new google.maps.Map(document.getElementById('map'), {
    center: fenway,
    zoom: 14
  });
  var panorama = new google.maps.StreetViewPanorama(
      document.getElementById('pano'), {
        position: fenway,
        pov: {
          heading: 34,
          pitch: 10
        }
      });
  map.setStreetView(panorama);
}

    </script>
    <script async defer
        src="https://maps.googleapis.com/maps/api/js?key=**YOUR_API_KEY**&signed_in=true&callback=initialize">
    </script>
  </body>
</html>
2

You will find everything you need to know about the API key on this Google page: https://developers.google.com/maps/documentation/javascript/get-api-key

Simply scroll down and hit the Get Key button, accept the terms and you'll be ready.

  • Thx Zoon, I now have the correct API key. – Brendan Lizzo Feb 6 '16 at 7:45
  • @BrendanLizzo Perfect, I'm happy to hear it. If you feel your question has been answered, please remember to mark the answer that solved your question by hitting the checkmark next to the answer. – Zoon Feb 7 '16 at 8:31
0

CLick below src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&signed_in=true&callback=initialize">

On the "Your API Key" Then Developers console will open,ON the top You will see "Enable and Mange API's" Then fill the form you will find your API KEy Developers Console

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.