首先请原谅我的英语……我是法国人。
我尝试填充此代码生成的瓷砖,但如果地面接触瓷砖下方,则使用背景颜色。
function CoordMapType(tileSize) {
this.tileSize = tileSize;
}
CoordMapType.prototype.getTile = function(coord, zoom, ownerDocument) {
var div = ownerDocument.createElement('sq');
div.style.width = this.tileSize.width + 'px';
div.style.height = this.tileSize.height + 'px';
return div;
};
var map;
var chicago = new google.maps.LatLng(41.850033,-87.6500523);
function initialize() {
var mapOptions = {
zoom: 10,
center: chicago,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
// Insert this overlay map type as the first overlay map type at
// position 0. Note that all overlay map types appear on top of
// their parent base map.
map.overlayMapTypes.insertAt(
0, new CoordMapType(new google.maps.Size(16, 16)));
}
如果有人有想法,我期待您的回应或采取的路径。
谢谢
查尔斯