【发布时间】:2013-08-18 07:29:36
【问题描述】:
我正在尝试更改标记大小,但无论我如何尝试,它们都会消失。我试过这个:
scaledSize: new google.maps.Size(100, 68)
var marker;
addressDetails = stringArray[x].split("&&&");
var lat = new google.maps.LatLng(addressDetails[1], addressDetails[2]);
//Create a new marker and info window
marker = new google.maps.Marker({
map: map,
position: lat,
icon: 'http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=A|000000|FFF',
content: addressDetails[0]
});
markersArray.push(marker);
【问题讨论】:
-
Change marker size in Google maps V3 已过时。 MarkerImage 类已被弃用(不再在官方 Google 文档中列出,因为不再提供包含它的任何版本)并替换为 google.maps.Icon 对象。不过原理是一样的,只要使用文档中定义的匿名对象即可。
标签: javascript google-maps google-maps-api-3