admin管理员组文章数量:1023738
This is a long shot, but I was wondering if there were any settings in Google Maps API v3 that would allow me to set where on my custom "draggableCursor" the tip/end (for lack of a better word) of the cursor should be. The default settings seem to be that the top left hand corner of the image is the cursor point, but I want it to be the bottom left hand side.
Here is my code so far:
map.setOptions({ draggableCursor: 'url(images/markers/you_marker.cur), default' });
This is a long shot, but I was wondering if there were any settings in Google Maps API v3 that would allow me to set where on my custom "draggableCursor" the tip/end (for lack of a better word) of the cursor should be. The default settings seem to be that the top left hand corner of the image is the cursor point, but I want it to be the bottom left hand side.
Here is my code so far:
map.setOptions({ draggableCursor: 'url(images/markers/you_marker.cur), default' });
Share
Improve this question
asked May 21, 2012 at 14:30
ColinColin
2,4873 gold badges35 silver badges51 bronze badges
2 Answers
Reset to default 5Andrew Leach's answer is correct in that the cursor hotspot is defined in the .cur file, except Google Maps won't recognize it.
For a custom cursor in Google Maps you can change the hotspot by setting the coordinates in a CSS rule:
map.setOptions({ draggableCursor: 'url(images/markers/you_marker.cur) 16 16, default' });
The hotspot for a cursor should be defined in the .cur
file. It defaults to the top-left in the absence of any other position being specified. The API simply specifies which cursor file to use.
http://www.axialis./tutorials/what-is-a-cursor.html#t8 (other cursor design programs are available).
This is a long shot, but I was wondering if there were any settings in Google Maps API v3 that would allow me to set where on my custom "draggableCursor" the tip/end (for lack of a better word) of the cursor should be. The default settings seem to be that the top left hand corner of the image is the cursor point, but I want it to be the bottom left hand side.
Here is my code so far:
map.setOptions({ draggableCursor: 'url(images/markers/you_marker.cur), default' });
This is a long shot, but I was wondering if there were any settings in Google Maps API v3 that would allow me to set where on my custom "draggableCursor" the tip/end (for lack of a better word) of the cursor should be. The default settings seem to be that the top left hand corner of the image is the cursor point, but I want it to be the bottom left hand side.
Here is my code so far:
map.setOptions({ draggableCursor: 'url(images/markers/you_marker.cur), default' });
Share
Improve this question
asked May 21, 2012 at 14:30
ColinColin
2,4873 gold badges35 silver badges51 bronze badges
2 Answers
Reset to default 5Andrew Leach's answer is correct in that the cursor hotspot is defined in the .cur file, except Google Maps won't recognize it.
For a custom cursor in Google Maps you can change the hotspot by setting the coordinates in a CSS rule:
map.setOptions({ draggableCursor: 'url(images/markers/you_marker.cur) 16 16, default' });
The hotspot for a cursor should be defined in the .cur
file. It defaults to the top-left in the absence of any other position being specified. The API simply specifies which cursor file to use.
http://www.axialis./tutorials/what-is-a-cursor.html#t8 (other cursor design programs are available).
本文标签: javascriptGoogle Maps API v3 draggableCursor options such as positionStack Overflow
版权声明:本文标题:javascript - Google Maps API v3 draggableCursor options such as position - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745552483a2155695.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论