当我放置一个带有大图标的标记时,我无法调整它,当我放置一个小图像时,它会被像素化
let icon = 'www/assets/images/car3.png';
let position: GoogleMapsLatLng = new GoogleMapsLatLng(0,0);
let markerOptions: GoogleMapsMarkerOptions = {
position: position,
icon:icon
};
您可以为您的标记提供选项。
let marker;
//example
let icon = {
size: new google.maps.Size(46, 70),
origin: new google.maps.Point(0, 0),
anchor: new google.maps.Point(22, 70),
scaledSize: new google.maps.Size(46, 70),
icon: [URL]
};
marker = new google.maps.Marker({
map: this.map,
animation: google.maps.Animation.DROP,
position: new google.maps.LatLng(
position.lat,
position.lng),
icon: icon
});
marker.setMap(this.map);