This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
built_in:start [2018/12/30 04:59] 114.125.15.7 [Table] |
built_in:start [2018/12/31 01:07] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | < | + | ======Built-in features |
- | < | + | |
- | < | + | |
- | < | + | |
- | /* Set the size of the div element that contains the map */ | + | |
- | #map { | + | |
- | height: 400px; | + | |
- | width: 100%; /* The width is the width of the web page */ | + | |
- | } | + | |
- | </ | + | |
- | </ | + | |
- | < | + | |
- | < | + | |
- | <!--The div element for the map --> | + | |
- | <div id=" | + | |
- | < | + | |
- | // Initialize and add the map | + | |
- | function initMap() { | + | |
- | // The location of Uluru | + | |
- | var uluru = {lat: -25.344, lng: 131.036}; | + | |
- | // The map, centered at Uluru | + | |
- | var map = new google.maps.Map( | + | |
- | document.getElementById(' | + | |
- | // The marker, positioned at Uluru | + | |
- | var marker | + | |
- | } | + | |
- | </ | + | |
- | <!--Load the API from the specified URL | + | |
- | * The async attribute allows the browser to render the page while the API loads | + | |
- | * The key parameter will contain your own API key (which is not needed for this tutorial) | + | |
- | * The callback parameter executes the initMap() function | + | |
- | --> | + | |
- | <script async defer | + | |
- | src=" | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
====Links==== | ====Links==== | ||
- | ^ App and Layout | + | ^App and Layout^ |
- | | [[app|app object]] | + | | [[app|app object]] | |
- | | [[built_in: | + | | [[built_in: |
- | | [[built_in: | + | | [[built_in: |
==== Controls ==== | ==== Controls ==== | ||
^ Controls | ^ Controls |