2013-05-23 3 views
5

마우스 포인터 커서 스타일을 Google지도 아이콘 마커에서 멈추게하려면 어떻게해야합니까? 현재 마커는 커서를 마우스로 가리키면 커서가 손 모양으로 바뀌는 링크와 같이 작동합니다. 당신이 cursor 속성을 설정할 수 있습니다,마우스 포인터 커서 스타일을 사용하는 Google지도 마커를 중지 하시겠습니까?

function addMarkerLargeMap(latlng, myTitle, html, price) { 
    markers.push(new google.maps.Marker({ 
     position: latlng, 
     clickable: false, 
     map: map, 
     title: myTitle, 
     icon: "path-to-my-icon.png", 
     html: "<div style='width:100px;height:auto'>" + html + "</div>", 
     })); 

또는 마커 옵션에서 false로

function addMarkerLargeMap(latlng, myTitle, html, price) { 
    markers.push(new google.maps.Marker({ 
     position: latlng, 
     map: map, 
     title: myTitle, 
     icon: "path-to-my-icon.png", 
     html: "<div style='width:100px;height:auto'>" + html + "</div>", 

     })); 
+0

marker.setCursor ({cursor : 'default'}) – PiLHA

답변

15

설정 클릭 : 여기

마커를 생성하는 코드입니다 마커 옵션에서 커서 대신 특정 유형의 커서를 사용하려는 경우 기본값. 예 :
cursor: 'crosshair' 

마커 클릭 할 경우에만 동작하는 것처럼 보이지만

.

+1

'clickable : false'를 설정하면'title' (툴팁)이 표시되지 않습니다. – 10basetom

0

#main_map img {cursor:default!important;}

+0

Doest do anything을 수행 할 수 있습니다. 또한 필자는 #map_canvas img를 사용하여 내지도의 ID를 확인했습니다. – Evans

+0

'cursor : pointer'는 이미지의 인라인 스타일입니까? 'cursor : pointer'가 필요한 다른 이미지가 있습니까? 만약 당신이 할 수있는 것이 아니라면'img {cursor : default! important; }'. –

관련 문제