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
Add a ment  | 

2 Answers 2

Reset to default 5

Andrew 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
Add a ment  | 

2 Answers 2

Reset to default 5

Andrew 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