Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>CaRtOgRaXaRp1</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
- <meta charset="utf-8">
- <style>
- /* Always set the map height explicitly to define the size of the div
- * element that contains the map. */
- #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>
- var map;
- function initMap() {
- map = new google.maps.Map(document.getElementById('map'), {
- zoom: 12,
- center: new google.maps.LatLng(-3.7887648, -38.5946788),
- mapTypeId: 'roadmap'
- });
- var contentString = '<div id="content">'+
- '<div id="siteNotice">'+
- '</div>'+
- '<h1 id="firstHeading" class="firstHeading">Uluru</h1>'+
- '<div id="bodyContent">'+
- '<p><b>Uluru</b>, also referred to as <b>Ayers Rock</b>, is a large ' +
- 'sandstone rock formation in the southern part of the '+
- 'Northern Territory, central Australia. It lies 335 km (208 mi) '+
- 'south west of the nearest large town, Alice Springs; 450 km '+
- '(280 mi) by road. Kata Tjuta and Uluru are the two major '+
- 'features of the Uluru - Kata Tjuta National Park. Uluru is '+
- 'sacred to the Pitjantjatjara and Yankunytjatjara, the '+
- 'Aboriginal people of the area. It has many springs, waterholes, '+
- 'rock caves and ancient paintings. Uluru is listed as a World '+
- 'Heritage Site.</p>'+
- '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
- 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
- '(last visited June 22, 2009).</p>'+
- '</div>'+
- '</div>';
- var infowindow = new google.maps.InfoWindow({
- content: contentString
- });
- var iconBase = 'https://maps.google.com/mapfiles/kml/shapes/';
- var icons = {
- parking: {
- icon: iconBase + 'parking_lot_maps.png'
- },
- library: {
- icon: iconBase + 'library_maps.png'
- },
- info: {
- icon: iconBase + 'info-i_maps.png'
- }
- };
- var features = [
- {
- "Id": 1,
- position: new google.maps.LatLng(-3.7887800, -38.5946788),
- type: 'info'
- },
- {
- "Id": 2,
- position: new google.maps.LatLng(-3.7887648, -38.5946788),
- type: 'info'
- },
- ];
- // Create markers.
- features.forEach(function(feature) {
- var marker = new google.maps.Marker({
- position: feature.position,
- icon: icons[feature.type].icon,
- map: map
- });
- marker.addListener('click', function() {
- infowindow.open(map, marker);
- });
- });
- }
- </script>
- <script async defer
- src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCX1FKSQXy-AMLnQvUNNzi5IFJFiR26fBs&callback=initMap">
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement