我正在将一个非常基本的 Google map 插入到我的页面中,缩放控件和街道 map 图标不可见,但是如果我将鼠标放在它们应该在的位置上,我可以缩放 map 并进入街景 View 。 所以控件在那里只是不可见。
<script type="text/javascript"
src="//maps.googleapis.com/maps/api/js?key=<apikey>&sensor=false®ion=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);
知道问题出在哪里吗?
最佳答案
这绝对是您的代码中存在的 CSS 问题。寻找适用于所有图像的 CSS,例如:
img {
max-width: 100%;
}
关于css - 缩放控制和街景未显示在我的 Google map 上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8511436/