Skip to content

Commit fbc3bd8

Browse files
authored
fix: Updates the CSS style for improved visual appearance. (#1042)
1 parent 504edae commit fbc3bd8

3 files changed

Lines changed: 25 additions & 9 deletions

File tree

samples/streetview-overlays/index.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
</head>
1818
<body>
1919
<gmp-map map-id="DEMO_MAP_ID" center="40.729884, -73.990988" zoom="18">
20-
<div id="floating-panel" slot="control-inline-start-block-start">
21-
<input type="button" value="Toggle Street View" id="toggle" />
22-
</div>
20+
<input type="button" value="Toggle Street View" id="streetview-toggle-button" slot="control-block-start-inline-start" />
2321
</gmp-map>
2422
</body>
2523
</html>

samples/streetview-overlays/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,9 @@ async function initMap() {
2222
) as google.maps.MapElement;
2323

2424
innerMap = mapElement.innerMap;
25-
innerMap.setOptions({
26-
mapTypeControl: false,
27-
streetViewControl: false,
28-
fullscreenControl: false,
29-
});
3025

3126
document
32-
.getElementById('toggle')!
27+
.getElementById('streetview-toggle-button')!
3328
.addEventListener('click', toggleStreetView);
3429

3530
const cafeIcon = document.createElement('img');

samples/streetview-overlays/style.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,27 @@ body {
3636
padding-left: 10px;
3737
}
3838

39+
#streetview-toggle-button {
40+
height: 40px;
41+
display: flex;
42+
align-items: center;
43+
justify-content: center;
44+
padding: 0 17px;
45+
border: none;
46+
background: white;
47+
cursor: pointer;
48+
border-radius: 2px;
49+
box-shadow: 0 1px 4px -1px rgba(0, 0, 0, 0.3);
50+
margin: 10px 0px 10px -2px;
51+
font-family: Roboto, Arial, sans-serif;
52+
font-size: 18px;
53+
font-weight: 400;
54+
color: rgb(86, 86, 86);
55+
}
56+
57+
#streetview-toggle-button:hover {
58+
background: #f4f4f4;
59+
color: #000;
60+
}
61+
3962
/* [END maps_streetview_overlays] */

0 commit comments

Comments
 (0)