我创建了可编辑的圈子,我的谷歌地图提示此链接: https://developers.google.com/maps/articles/mvcfun
我想将光标更改为圆形的十字线或png图像。 我可以这样做吗?
答案 0 :(得分:1)
我认为您需要custom
圈光标,请尝试以下代码:
var crosshairShape = {coords:[0,0,0,0],type:'rect'};
var latlng = new google.maps.LatLng(54.62279178711505,-5.895538330078125);
var myOptions = {zoom:12,center:latlng,mapTypeId:google.maps.MapTypeId.SATELLITE,draggableCursor:'crosshair',mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}};
var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
var marker = new google.maps.Marker({
map: map,
icon: 'http://www.daftlogic.com/images/cross-hairs.gif',
shape: crosshairShape
});
marker.bindTo('position', map, 'center');
有关详细信息,请参阅here。