Google Maps api
How do I make an google maps api?
What is a google maps api? How do you make a google maps api? This script and codes were developed by Kevin on 13 October 2022, Thursday.
Google Maps api - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Google Maps api</title> <link rel='stylesheet prefetch' href='http://cdnjs.cloudflare.com/ajax/libs/flexboxgrid/6.3.1/flexboxgrid.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <section id="location"> <div class="content"> <h1 class="wow fadeInDown titles" data-wow-delay="0.2s">Location</h1> <div class="row center-sm middle-sm"> <div class="col-xs-12 col-sm-6"> <div class="row center-sm" id="panel"> <div class="col-xs-12 col-sm-8 form-control"> <h2 class="wow fadeInDown" data-wow-delay="0.2s">Address</h2> <p> Grand Hall at Pabst Best Place 901 W. Juneau Ave Milwaukee, WI 53233</p> </div> <div class="col-xs-12 col-sm-8 form-control"> <form> <h2 class="wow fadeInDown" data-wow-delay="0.2s">Get Directions</h2> <div class="col-xs-12"> <label>Your Address: </label> <input id="start" placeholder="Home" value="1410 Museum Campus Dr, Chicago, IL 60605" type="text"> </div> <div class="col-xs-12 col-sm-offset-4 col-sm-4"> <input type="button" class="btn btn-map" value="Update" onclick="calcRoute();"> </div> </form> </div> </div> </div> <div class=" col-xs-12 col-sm-6"> <div id="map-canvas"></div> </div> </div> </section> <script src='https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false'></script> <script src="js/index.js"></script>
</body>
</html>
Google Maps api - Script Codes CSS Codes
h2{ color:$salmon;
}
#map-canvas{ overflow:hidden; padding-bottom:56.25%; position:relative; height:0;
}
#map-canvas iframe{ left:0; top:0; height:100%; width:100%; position:absolute;
}
#panel { top: 10px; z-index: 5; padding-bottom:10px; font-weight:300; text-align:center; margin:0 auto; input{ width:100%; text-align:center; border: 1px solid #e3e3e3; } label{ font-size:1.5em; } .panel-inputs{ justify-content:center; align-items:center; }
}
Google Maps api - Script Codes JS Codes
var directionsDisplay;
var directionsService = new google.maps.DirectionsService();
var map;
var initMap = function() { var myLatlng = new google.maps.LatLng(43.045466, -87.923418); directionsDisplay = new google.maps.DirectionsRenderer(); var mapOptions = { zoom: 18, center: myLatlng } var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); directionsDisplay.setMap(map); var marker = new google.maps.Marker({ position: myLatlng, map: map, title: 'Morales Wedding' });
}
var calcRoute = function() { var start = document.getElementById('start').value; var end = 'Grand Hall at Pabst Best Place 901 W Juneau Ave Milwaukee, WI 53233'; var request = { origin: start, destination: end, travelMode: google.maps.TravelMode.DRIVING }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } else { alert("Sorry, no driving route can be found between these locations"); } });
}
google.maps.event.addDomListener(window, 'load', initMap);
Developer | Kevin |
Username | gnarfugh |
Uploaded | October 13, 2022 |
Rating | 3 |
Size | 2,795 Kb |
Views | 24,288 |
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 |
Old calculator | 2,815 Kb |
Small fizzbuzz | 1,412 Kb |
Highlight table | 90,049 Kb |
Responsive Table | 2,303 Kb |
Image slider | 3,393 Kb |
Hover icon link over image | 2,915 Kb |
Ajax Flickr Search | 7,084 Kb |
Hamburger | 2,396 Kb |
React Scoreboard | 3,912 Kb |
Sticky nav | 5,206 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 |
LDE old privacy page | Jasonangle | 2,339 Kb |
A Pen by Brendan Skousen | Bskousen | 2,954 Kb |
A Pen by Adrien Clerbois | AClerbois | 6,501 Kb |
Ocean | Gordonnl | 2,817 Kb |
Portfolio Page | HuffmanJ25 | 5,240 Kb |
Typefaces with descriptions | Megandoty | 2,944 Kb |
Wikipedia Viewer | Odylic | 2,333 Kb |
Bootstrap Carousel Fade Transition | Rowno | 2,484 Kb |
Flex Chart | James_zedd | 4,111 Kb |
Scifi-style Interative Form | Aaronchuo | 4,566 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!