-
Notifications
You must be signed in to change notification settings - Fork 820
/
index.js
Latest commit
26 lines (24 loc) · 732 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
* @license
* Copyright 2019 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
// [START maps_interaction_cooperative]
/**
* This sample sets the gesture handling mode to 'cooperative',
* which means that on a mobile device, the user must swipe with one
* finger to scroll the page and two fingers to pan the map.
*/
function initMap() {
const center = { lat: -25.363, lng: 131.044 };
const zoom = 4;
// [START maps_interaction_cooperative_mapoptions]
new google.maps.Map(document.getElementById( "map" ), {
zoom,
center,
gestureHandling: "cooperative",
});
// [END maps_interaction_cooperative_mapoptions]
}
window.initMap = initMap;
// [END maps_interaction_cooperative]