Google地图缩放控件呈现为白色矩形

Google地图缩放控件呈现为白色矩形

本文介绍了Google地图缩放控件呈现为白色矩形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Google地图在dotNet应用程序内的地图上显示标记,制作了一个简单的页面。问题是右下角的scaleControl。它呈现为白色矩形,而不是预期的比例指标。如果我点击白色矩形,它会变得更大一点,正如预期的那样,因为它在公里和英里之间切换,只是它不能正确呈现。

  function Init(lat,lng,zoomLvl){
ll = new google.maps.LatLng(lat,lng);
zoom = zoomLvl;
var mO = {
scaleControl:true,
zoom:zoom,
zoomControl:true,
zoomControlOptions:{style:google.maps.ZoomControlStyle.LARGE},
center:ll,
disableDoubleClickZoom:true,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById(map),mO);
}


如果任何人都可以对这种情况有所了解

解决方案

此问题刚刚在另一个问题中得到了解答。 给出的答案


I made a simple page using google maps to display markers on a map inside a dotNet application. The issue is the scaleControl in the low-right corner. It is rendering as a white rectangle, instead of the expected scale indicator. If I click the white rectangle it becomes a little bigger, as is expected because it is switching between km and miles, only it's not rendering correctly.

function Init(lat, lng, zoomLvl) {
  ll = new google.maps.LatLng(lat, lng);
  zoom = zoomLvl;
  var mO = {
    scaleControl:true,
    zoom:zoom,
    zoomControl:true,
    zoomControlOptions: {style:google.maps.ZoomControlStyle.LARGE},
    center: ll,
    disableDoubleClickZoom:true,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  map = new google.maps.Map(document.getElementById("map"), mO);
}

If anyone could shed some light on the situation?

解决方案

This issue has just been answered in another question.

See scaleControl not displaying correctly in .net for the answer given there

这篇关于Google地图缩放控件呈现为白色矩形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 14:27