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 |
AJAX content from an RSS feed using jQuery | 3,878 Kb |
First steps with Handlebars.js | 3,978 Kb |
Flexbox login form | 3,551 Kb |
Test Case for ajax fail on single result | 3,297 Kb |
Nested flexbox layout for library catalog v2 | 3,409 Kb |
Homepage thumbnail | 1,852 Kb |
Sutherland Shire Libraries Catalogue Search | 2,732 Kb |
Using Google Spreadsheets as JSON Source | 2,492 Kb |
Test Case for ajax fail on single result v2 | 3,313 Kb |
Nested flexbox layout for library catalog | 3,271 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 |
Pictos font library from CodePen | Jstam | 3,790 Kb |
We Simplify animation | Meodai | 48,169 Kb |
Tiling Subdivision | Francext | 3,937 Kb |
Ipad Mini Showcase | Hornebom | 10,479 Kb |
AngularJS Animated Todo List | Ehaase | 2,975 Kb |
Pure CSS Tooltip | APinix | 2,815 Kb |
Testing Code Pen | Jduprey | 1,468 Kb |
NT Tribute | Skybutterfly | 2,850 Kb |
HexMaze | Cantelope | 4,825 Kb |
Brent Burns Tribute Page | Nevada48 | 2,569 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!