you can use the setVisible and getVisible method:

myMarker.setVisible( true or false )
myMarker.getVisible()

http://code.google.com/apis/maps/documentation/javascript/reference.html#MarkerOptions


Shadow for curiousity I also tried your code, it works, so it's possible to
add new method to the marker object,
that's so interesting!

By the way,

myMarker.isVisible = function () { return true; }

will always return true, so the correct return it should be

myMarker.isVisible = function () { return this.visible; }


Cheers,
Federico

2010/8/4 Shadow <shadowcree...@gmail.com>

> After your constructor:
> var myMarker = <your marker constructor>;
>
> Use one of the following:
> myMarker.visible = true;
> myMarker.isVisible = function () { return true; }
>
> Does that fail for some reason?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To post to this group, send email to
> google-maps-js-api...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-maps-js-api-v3+unsubscr...@googlegroups.com<google-maps-js-api-v3%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to