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 <[email protected]> > 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 > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-maps-js-api-v3%[email protected]> > . > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
