Google Maps API Ground Overlay
How do I make an google maps api ground overlay?
Load a image overlay of a local subdivision map on google base map. What is a google maps api ground overlay? How do you make a google maps api ground overlay? This script and codes were developed by Martin Boyce on 20 September 2022, Tuesday.
Google Maps API Ground Overlay - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Google Maps API Ground Overlay</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="map" class="map"></div>
<div class="map-slider"> Drag to Show / Hide Map <input id="slider1" type="range" min="0" max="1" step="0.1" value="1" />
</div>
<div class="container-fluid"> <div class="row"> <div class="col-lg-8 col-lg-offset-2"> <h1>Sutherland Shire Libraries <small>Como Subdivision Map</small></h1> <p class="lead">Zoom in and out to see detail on the Como Subdivision Map. Drag the slider to adjust the transparency of the map.</p> </div> </div><!-- /row -->
</div><!-- /container -->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCXibAAKiuyyPPWHdNh8fJV5_IHaELAicg&sensor=true"></script> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Google Maps API Ground Overlay - Script Codes CSS Codes
.map { width: 100vw; height: 70vh; background-color: #d4e4e4;
}
.map-slider { background-color: #0083a9; margin: 0; padding-top: 12px; padding-bottom: 6px; color: #ffffff; text-align: center;
}
.map-slider > input[type='range'] { width: 200px; margin: 0 auto; margin-top: 6px;
}
Google Maps API Ground Overlay - Script Codes JS Codes
// This example uses a GroundOverlay to place an image on the map
var historicalOverlay;
function initMap() { var map = new google.maps.Map(document.getElementById('map'), { zoom: 13, center: {lat: -34.001088, lng: 151.068543}, scaleControl: true, streetViewControl: false, mapTypeControl: true, mapTypeId: google.maps.MapTypeId.ROADMAP }); var imageBounds = { north: -33.99019, south: -34.01175, east: 151.08132, west: 151.06315 }; historicalOverlay = new google.maps.GroundOverlay( 'https://dl.dropboxusercontent.com/u/192772681/como-overlay.png', imageBounds); historicalOverlay.setMap(map);
}
$('#slider1').change(function() { var newOpacityStr = $(this).val(); var newOpacity = parseFloat(newOpacityStr); historicalOverlay.setOpacity(newOpacity);
});
google.maps.event.addDomListener(window, 'load', initMap);
Developer | Martin Boyce |
Username | boycetrus |
Uploaded | September 20, 2022 |
Rating | 3 |
Size | 2,961 Kb |
Views | 28,336 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
First steps with Handlebars.js | 3,978 Kb |
Flexbox login form | 3,551 Kb |
Sutherland Shire Libraries Catalogue Search | 2,732 Kb |
Nested flexbox layout for library catalog | 3,271 Kb |
Google Analytics Event Tracking using html5 data attributes | 2,560 Kb |
Google Maps API Custom Overlay | 3,336 Kb |
Flexbox horozontal scrolling booklist | 5,605 Kb |
Using Google Spreadsheets as JSON Source | 2,492 Kb |
Google Maps API test | 4,057 Kb |
Get the app | 3,198 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Siema - add pagination to prototype | Pawelgrzybek | 2,575 Kb |
Scroll using CSS | Casperovic | 2,159 Kb |
CodeCamp Tribute Page | JonathanDeJesus | 6,860 Kb |
Display properties | Hamzaerbay | 1,886 Kb |
Pure CSS Read More Arrow | Zephyr | 1,747 Kb |
Google Maps API Ground Overlay | Boycetrus | 2,961 Kb |
Brown by pure CSS, no image, no javascript | Aaronchuo | 2,652 Kb |
Loader | MikitaLisavets | 3,321 Kb |
Click handler test | Snapson | 2,329 Kb |
Canvas stripes | Adrianparr | 1,948 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!