开发者

KML Layers Cursor CSS - Google Maps API v3

开发者 https://www.devze.com 2022-12-30 08:55 出处:网络
I\'ve run into a small problem with the semi-new KML Overlay functionality with Google Maps API v3, wh开发者_开发知识库erein while I am able to use \"suppressInfoWindows: true;\", the cursor still app

I've run into a small problem with the semi-new KML Overlay functionality with Google Maps API v3, wh开发者_开发知识库erein while I am able to use "suppressInfoWindows: true;", the cursor still appears as though the overlay(s) are clickable.

Is there a way at this time to change the css on the overlay(s) so that the cursor is the default cursor, so that they are purely visual, and don't confuse the user?


You can do this through javascript (not sure about a purely CSS solution) using something along the lines of...

var ctaLayer = new google.maps.KmlLayer({
    url: 'myKmlFile.kml',
    suppressInfoWindows: true
});
if (ctaLayer.suppressInfoWindows) ctaLayer.setOptions({clickable:false});
ctaLayer.setMap(map);


This sounds like a bug. You should file it at the Google Maps API's issue tracker.

0

精彩评论

暂无评论...
验证码 换一张
取 消