Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zoom control and streetview not showing on my Google map?

I'm inserting a very basic Google map into my page and the zoom control and streetmap icon are not visible, however if I place my mouse over where they should be I can zoom the map and enter streetview. So the controls are there just not visible.

<script type="text/javascript"     src="//maps.googleapis.com/maps/api/js?key=<apikey>&sensor=false&region=IT"> </script>  var myOptions = {     zoom: 17,     center: latlng,     panControl: true,     zoomControl: true,     zoomControlOptions: {         style: google.maps.ZoomControlStyle.LARGE     },     scaleControl: true,     mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); 

Any ideas what the problem could be?

Missing controls

like image 343
Phill Avatar asked Dec 14 '11 20:12

Phill


People also ask

Where is the zoom button on Google Maps?

The Zoom control displays "+" and "-" buttons for changing the zoom level of the map. This control appears by default in the bottom right corner of the map.

How do you show zoom control on Google map which method of map view is used?

Want to add zoom controls to Android MapView? We can achieve this by calling setBuiltInZoomControls(boolean) method. map. setBuiltInZoomControls(true);

How do I zoom in on Google Maps Street View?

To zoom in or out, scroll with your mouse or two-finger zoom with a touchpad. You can also use + and - below the compass. To position your Street View north, go to the bottom right and click the compass. To jump between streets, go to the "Back to Map" window in the bottom left and click the blue highlighted routes.


2 Answers

That is definitely a CSS issue that you have with your code. Look for CSS that is applying to all images like:

img {   max-width: 100%; } 
like image 91
skarE Avatar answered Oct 06 '22 10:10

skarE


I had this problem, the fix was to include this CSS ...

.gmnoprint img { max-width: none; } 

The CSS selector .gmnoprint img gets to all images [img] on the Google Map [gm] controls that are non printing [noprint]. In my case max-width had been set globally to 100%. Unsetting this fixed the issue.

like image 39
Pete Avatar answered Oct 06 '22 08:10

Pete