0

I have embedded a streetview map that I want to only perform the action to look around (by click and drag with the mouse or with the compass) but not to move to a direction.

I tried by applying pointer-events to none but that stops all pointer actions.

Here is a link to my code: https://jsfiddle.net/Dimgk1984/8tnxo3as

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Street View controls</title>
   <style>
      /* Always set the map height explicitly to define the size of the div
       * element that contains the map. */
      #map {
        height: 100%;
      }
      /* Optional: Makes the sample page fill the window. */
      html, body {
        height: 100%;
        margin: 0;
        padding: 0;
      }
    </style>
  </head>
  <body>
      <div class="map-container">
        <iframe src="https://www.google.com/maps/embed?pb=!4v1518736193836!6m8!1m7!1szChzPIAn4RIAAAQvxgbyEg!2m2!1d29.56028532748453!2d-95.08539144618427!3f213.12!4f0.18000000000000682!5f0.7820865974627469" style="margin-top:-100px" width="100%" height="1000" frameborder="0"allowfullscreen >
   </iframe>
        <style>
        .map-container {
        pointer-events: none;}
        </style>
  </body>
</html>
old_timer
  • 69,149
  • 8
  • 89
  • 168
Dimitris
  • 35
  • 1
  • 8

1 Answers1

0

Try to set StreetViewPanoramaOptions to False and/or LinksControl. On Gmaps streetview API reference they also mention streetViewControl. Try it. Its pretty well documented on their reference page.

N3ttX
  • 94
  • 1
  • 9
  • 1
    Thank you! I am not so sure how can I use the StreetViewPanoramaOptions and LinksControl with the Iframe embeded method. I used this method before by finding the position of the place (lat and lng) but it doesn't seems to work. Here is my previous method: https://jsfiddle.net/Dimgk1984/zes7abua/13/ – Dimitris Feb 18 '18 at 20:24