缩放控制和街景没有显示在我的 Google 地图上? [英] Zoom control and streetview not showing on my Google map?

查看:25
本文介绍了缩放控制和街景没有显示在我的 Google 地图上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的页面中插入了一个非常基本的 Google 地图,并且缩放控件和街道地图图标不可见,但是如果我将鼠标放在它们应该放置的位置上,我可以缩放地图并进入街景视图.所以控件在那里是不可见的.

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?

推荐答案

这绝对是您的代码存在的 CSS 问题.寻找适用于所有图像的 CSS,例如:

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%;
}

这篇关于缩放控制和街景没有显示在我的 Google 地图上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆