在运行时更改google maps v3中的光标 [英] Change cursor in google maps v3 in runtime

查看:119
本文介绍了在运行时更改google maps v3中的光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在创建时,可以在google.maps.Map对象中设置 draggableCursor 选项。有没有办法在运行时设置这个选项?还是有没有其他干净的方式如何在运行时更改光标?我搜索了文档但没有像 setDraggableCursor 方法...

The draggableCursor option can be set in google.maps.Map object upon creation. Is there any way how one could set this option in runtime? Or is there any other clean way how to change the cursor in runtime? I've searched through the documentation but there's nothing like setDraggableCursor method...

推荐答案

在运行时设置。您必须使用 map.setOptions()函数设置地图选项。在选项对象中仅设置所需的属性:

The option can be set at runtime. You have to set the map options with map.setOptions() function. Set only the desired property in the options object:

map.setOptions({draggableCursor: myNewDraggableCursor});

这篇关于在运行时更改google maps v3中的光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆