Skip to content

Commit 86489b6

Browse files
Added cooperative gesture handling for all 3D samples (#860)
Co-authored-by: William French <[email protected]>
1 parent 9455e01 commit 86489b6

File tree

23 files changed

+34
-13
lines changed

23 files changed

+34
-13
lines changed

samples/3d-accessibility-features/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ async function initMap() {
1212

1313
const map = new Map3DElement({
1414
center: { lat: 34.8405, lng : -111.7909, altitude: 1322.70 }, range: 13279.50, tilt: 67.44 ,heading: 0.01,
15-
mode: 'SATELLITE'
15+
mode: 'SATELLITE',
16+
gestureHandling: "COOPERATIVE"
1617
});
1718

1819
// Set LatLng and title text for the markers. The first marker (Boynton Pass)

samples/3d-camera-boundary/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ async function initMap() {
1414
tilt: 67.5,
1515
mode: 'HYBRID',
1616
bounds: {south: -48.30, west: 163.56, north: -32.86, east: -180},
17+
gestureHandling: "COOPERATIVE"
1718
});
1819

1920
document.body.append(map);

samples/3d-camera-to-around/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ async function init() {
1010
const { Map3DElement } = await google.maps.importLibrary("maps3d");
1111

1212
const map = new Map3DElement(
13-
{ center: { lat: 37.79810773998413, lng : -122.41784275049939, altitude: 89.08476932205978 }, range: 6062.016931506805, tilt: 81.17100663963272, heading: -56.047035719765596, }
13+
{ center: { lat: 37.79810773998413, lng : -122.41784275049939, altitude: 89.08476932205978 }, range: 6062.016931506805, tilt: 81.17100663963272, heading: -56.047035719765596, gestureHandling: "COOPERATIVE" }
1414
);
1515

1616
map.mode = "SATELLITE";

samples/3d-label-toggle/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ async function init() {
1111
const { Map3DElement, MapMode } = await google.maps.importLibrary("maps3d");
1212

1313
map = new Map3DElement(
14-
{ center: { lat: 37.79810773998413, lng: -122.41784275049939, altitude: 89.08476932205978 }, range: 6062.016931506805, tilt: 81.17100663963272, heading: -56.047035719765596, }
14+
{ center: { lat: 37.79810773998413, lng: -122.41784275049939, altitude: 89.08476932205978 }, range: 6062.016931506805, tilt: 81.17100663963272, heading: -56.047035719765596, gestureHandling: "COOPERATIVE" }
1515
);
1616

1717
map.mode = MapMode.SATELLITE;

samples/3d-marker-click-event/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ async function initMap() {
1818
const map = new Map3DElement({
1919
...originalCamera,
2020
mode: "SATELLITE",
21+
gestureHandling: "COOPERATIVE"
2122
});
2223

2324
// Create the interactive marker and set the attributes.

samples/3d-marker-collision-behavior/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ async function init() {
1616
center: { lat: 47.6094, lng: -122.3390, altitude: 0 },
1717
range: 1000,
1818
mode: MapMode.HYBRID,
19+
gestureHandling: "COOPERATIVE"
1920
});
2021

2122
for (const [lng, lat] of positions) {

samples/3d-marker-customization/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ async function init() {
1414
center: { lat: 37.4176, lng: -122.02, altitude: 0 },
1515
tilt: 67.5,
1616
range: 7000,
17-
mode: 'HYBRID'
17+
mode: 'HYBRID',
18+
gestureHandling: "COOPERATIVE"
1819
});
1920

2021
map.mode = "SATELLITE";

samples/3d-marker-graphics/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ async function init() {
1414
const map = new Map3DElement({
1515
center: { lat: 37.426, lng: -122.082, altitude: 18 },
1616
tilt: 67.5,
17-
range: 4000,
18-
mode: 'SATELLITE'
17+
range: 4000,
18+
mode: 'SATELLITE',
19+
gestureHandling: "COOPERATIVE"
1920
});
2021

2122
// A marker with a with a URL pointing to a PNG.

samples/3d-marker-interactive/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ async function init() {
1414
center: { lat: 37.4690, lng: -122.1074, altitude: 0 },
1515
tilt: 67.5,
1616
range: 45000,
17-
mode: 'HYBRID'
17+
mode: 'HYBRID',
18+
gestureHandling: "COOPERATIVE"
1819
});
1920

2021
map.mode = "SATELLITE";

samples/3d-model-interactive/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ async function init() {
1313
const map = new Map3DElement({
1414
center: { lat: 39.1178, lng: -106.4452, altitude: 4395.4952 }, range: 1500, tilt: 74, heading: 0,
1515
mode: "HYBRID",
16+
gestureHandling: "COOPERATIVE"
1617
});
1718

1819
const model = new Model3DInteractiveElement({

0 commit comments

Comments
 (0)