27.10.2014 Views

Google Maps API 3

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

APPENDIX ■ <strong>API</strong> REFERENCE<br />

Table A-17. The Methods of the Marker Class<br />

Method Return Value Description<br />

getClickable() boolean Returns true if the marker is clickable<br />

and false if it’s not.<br />

getCursor() string Returns the current cursor that’s being<br />

used when the user holds the mouse<br />

pointer over the marker.<br />

getDraggable() boolean Returns true if the marker is draggable<br />

and false if it’s not.<br />

getFlat() boolean Returns true if the marker shadow is<br />

disabled (using the flat property) and<br />

false if it’s not.<br />

getIcon()<br />

getMap()<br />

string|Marker<br />

Image<br />

Map|StreetView<br />

Panorama<br />

Returns the icon of the marker.<br />

Returns a reference to the map or<br />

panorama that the marker is attached to.<br />

getPosition() LatLng Returns the position of the marker.<br />

getShadow()<br />

string|Marker<br />

Image<br />

Returns the shadow of the marker.<br />

getShape() MarkerShape Returns the shape of the marker.<br />

getTitle() string Returns the title of the marker.<br />

getVisible() boolean Returns true if the marker is visible and<br />

false if it’s not.<br />

getZIndex() number Returns the zIndex of the marker.<br />

setClickable(flag:boolean) None Sets the marker to be clickable or not.<br />

setCursor(cursor:string) None Sets the cursor that will be used when the<br />

user holds the mouse pointer over the<br />

marker.<br />

setDraggable(flag:boolean) None Sets the marker to be draggable or not.<br />

setFlat(flag:boolean) None Sets the marker to be able to have a<br />

shadow or not.<br />

256<br />

x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!