I believe that most maps api objects are considered final and not designed to be extended unless the documentation specifically states otherwise (such as with OverlayView and MVCObject).
You can either implement your own marker object as a custom overlay, or add additional prototypes to the provided Marker object (making sure not to conflict with any current prototypes). Chad Killingsworth On Mar 11, 1:03 pm, Thai Dang Vu <[email protected]> wrote: > Hi, > > You're in Vietnam, right? (your phone # tells me so). I want to try but I > don't know how to write it correctly :) > > If Marker is a java class, then I can do like this > > public MyMarker extends Marker { > private MyOwnInformation info; > public MyMarker(MarkerOptions options, MyOwnInformation info) { > super(options); > this.info = info; > } > > } > > Thai > > On Thu, Mar 11, 2010 at 1:43 PM, Peter Dang <[email protected]> wrote: > > > On Fri, Mar 12, 2010 at 12:37 AM, Thai Dang Vu <[email protected]> wrote: > > >> Hi Everybody, > > >> Maybe this is a javascript question ... but I'm not sure. > > >> I want to create a javascript class which extends the Marker class and > >> which is able to store some more information. So I will have something > >> similar to this > > >> function MyClass(markerOptions, my_own_information) { > >> // how to call the Marker's constructor? > >> } > > >> MyClass.prototype = new Marker(... what will be here? ...) > > >> Could anybody help me? > > >> Thank you. > > >> -- > >> 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. > > > -- > > Hi, > > As you mean..you want to make the class with Marker?..as I know marker is > > a class and I think you can do as you mean. You can try...I think it is a > > good idea. > > > Thanks and Best Regards > > > Peter Dang > > Professional Map team developer > > ------------------------------------------------------ > > Phone : +84 933 933 649 > > Axon Active Vietnam > > > -- > > 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.
