本文介绍了缩放控制项和街景视图未显示在我的Google地图上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的网页中插入了一个非常基本的Google地图,缩放控制项和街道地图图示不显示,但是如果我将滑鼠移到地图上,我可以缩放地图并输入streetview。
所以控件是不可见的。
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®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);
任何想法可能是什么问题?
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地图上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!