开发者

Google maps api v3 standard cursors

开发者 https://www.devze.com 2023-03-06 07:12 出处:网络
I want to set cursor. Google documentaion quote: setCursor(cursor:string) And that\'s all. What string should I enter? Can\'tfind l开发者_运维知识库ist of available cursors.It looks like you\'re

I want to set cursor. Google documentaion quote:

setCursor(cursor:string)

And that's all. What string should I enter? Can't find l开发者_运维知识库ist of available cursors.


It looks like you're looking at a method for the google.maps.Marker class. I think instead that you want to change an option on the map itself. Here's an example:

map.setOptions({draggableCursor:'crosshair'});

You can set it to null to return it to the default. I'll make a guess and say that the value can be any CSS cursor property. You may even be able to specify a url.


I suspect that the available values for cursors are the standard CSS cursors, which can be find here on the w3c website:

http://www.w3.org/TR/CSS21/ui.html#propdef-cursor


Not sure if you can access Googles own cursors, when I use it I only enter a path to an icon on my own server ie "\img\icon.png".

0

精彩评论

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