File tree Expand file tree Collapse file tree
samples/streetview-overlays Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff 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' ) ;
Original file line number Diff line number Diff 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] */
You can’t perform that action at this time.
0 commit comments