Forum Discussion
MannyHernandez1
8 years agoQrew Trainee
This new map service does not work for our company at all. We use the quick google box for roof shading analysis (we are a solar company). The satellite view for new mapbox is not as good as google. Now we have to take an extra step and click on the link to use google map.
I will have to figure out how to input a customer google box since nobody in my company likes the new mapbox.... :(
I will have to figure out how to input a customer google box since nobody in my company likes the new mapbox.... :(
- DanLadner18 years agoQrew TraineeYou can pull a Google Map image by creating a text formula field like so:
"<img src= " & "
In this case, I have all the parameters set up as fields on the record ("zoom", "maptype", etc.)--but you could hard-code those into the formula. Sounds like you want "satellite" as the maptype and a high zoom--I tested with 20 and it's pretty close to the roof.https://maps.googleapis.com/maps/api/staticmap?"
& "center=" & URLEncode([Address) & "&zoom=" & [zoom] & "&size=" & [width] & "x" & [height] & "&maptype=" & [type] & "&format=" & [format] & "&markers=color:" &[pin color] & "%7Clabel:" & [pin label] & "%7C" & URLEncode([Address]) & ">"
"Address" is just a default Address field.
More info on the Google Maps API here: https://developers.google.com/maps/documentation/static-maps/intro - MannyHernandez18 years agoQrew Traineevery interesting. I will test it out. thank you!
- MannyHernandez18 years agoQrew Traineeit worked! I also embedded the street view image.
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>