Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
57
rated 0 times [  64] [ 7]  / answers: 1 / hits: 28484  / 9 Years ago, fri, september 18, 2015, 12:00:00

I am trying to hide the toggle fullscreen element in the Streetview API HUD.



panorama = new google.maps.StreetViewPanorama(document.getElementById(data.id), {

position : new google.maps.LatLng(data.lat, data.lng),
pov: {
heading : Number(data.heading),
pitch : Number(data.pitch)
},
linksControl: false,
panControl: false,
addressControl: false,
enableCloseButton: false,
zoomControl: false,
fullScreenControl: false,
enableCloseButton: false,
addressControlOptions: {
position: google.maps.ControlPosition.BOTTOM_CENTER
}
});


These options are specced here. All the options are working except for the fullScreenControl



My code can be viewed live here. The UI element is in the top right corner of the viewport.



The documentation warns as follows:




Note: This page describes the controls available in version 3.22 and later of the Google Maps JavaScript API. If you want to continue using the earlier set of controls for a while, you can set google.maps.controlStyle = 'azteca' in v3.22. Read more about the changes to the controls in this article: What's New in the v3.22 Map Controls.




However I am linking to the API Js file as follows:



<script src=//maps.googleapis.com/maps/api/js?v=3.exp&sensor=false></script>


And 3.exp should be 3.22 at the moment of writing.



What am I missing here?


More From » google-maps

 Answers
32

Another solution is to use css to hide the fullscreen element:



.gm-style > div:nth-child(10){
display:none;
}

[#65007] Thursday, September 17, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
leilanichasel

Total Points: 224
Total Questions: 112
Total Answers: 94

Location: Angola
Member since Wed, Apr 13, 2022
2 Years ago
;