Thanks for your help. I did finally figure out how to do it
(hopefully correctly). For others who might have the same question
here was my solution:
<snip>
function Pin(opts) {
this.setValues(opts);
}
Pin.prototype = new google.maps.Marker;
/*
* Remove Pin
*/
Pin.prototype.remove = function () {
// clear from the map
this.setMap(null);
}
</snip>
Now, to figure out a way to do multiple inheritance with a Marker ...
On Jul 13, 11:33 pm, William <[email protected]> wrote:
> the google.maps.Marker is a MVCObject, so you shouldn't directly
> access the properties.
>
> However it might be best just to call the parent constructor and this
> should set all the options:
>
> function MyMarker(opts) {
> google.maps.Marker.apply(this, arguments);}
>
> MyMarker.prototype = new google.maps.Marker;
> ...
--
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.