Google Maps Javascript API Embed into Form

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • In Progress
How can I embed Google Map Javascript into my form?


But is it possible to embed the Google Map Javascript API with just embedded this into a Text-Formula field?


here is the documentation: https://developers.google.com/maps/documentation/javascript/examples/aerial-simple

<!DOCTYPE html>
<html>
  <head>
    "<meta name=""viewport" "content=""initial-scale=1.0, user-scalable=no">
    "<meta charset="utf-8">"
    "<title>45° imagery</title>"
    "<style>
      #map {
        height: 100%;
      }
      /* Optional: Makes the sample page fill the window. */
      html, body {
        height: 100%;
        margin: 0;
        padding: 0;
      }
    </style>
  </head>
  <body>
    <div id="map"></div>
    <script>
      function initMap() {
        var map = new google.maps.Map(document.getElementById('map'), {
          center: {lat: 36.964, lng: -122.015},
          zoom: 18,
          mapTypeId: 'satellite'
        });
        map.setTilt(45);
      }
    </script>
    <script async defer
    src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap">;
    </script>
  </body>
</html>
Photo of Manny Hernandez

Manny Hernandez

  • 258 Points 250 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb
You may already know this, but here goes. You can get Google Maps to work for you automatically when you use the [Address] data type.
Photo of Manny Hernandez

Manny Hernandez

  • 258 Points 250 badge 2x thumb
Not anymore. google switched the vendor on the address field. They switched from Google to Mapbox (which is not good enough for my company). I want an image EMBEDDED 45 degree onto my user's form. I already embedded a static map image and static street view image onto their form using a "Text - Formula" field. Now I need a 45 degree view - I don't mind if its static(image) or if its dynamic (Javascript). I just need it to be a automatic 45 degree image.

Background: We are a solar company making appointments for solar presentations at the customer's home. But when we qualify over the phone we need to make sure google does not show major tree shading. We need this as fast as possible, hence API. 

The reason we need the 45 degree map view ASAP is because we need to analyze the tree shading and make the appointment with the client fast. If my users need to click on the native link, which requires opening a new tab, then it takes away 30sec-60sec away which is a big delay when you consider that our business is a numbers game.

Street view and basic static satellite helps with this, but sometimes 45 degree view is necessary to make the final decision. 

I looked on Google's API documentation and it looks like only the Google Map Javascript API is capable of the 45 degree view. 
Which is fine if we can figure out how to embed it on the employee's form. 

Does anyone know if this is possible?