Marcelo wrote:
> On Oct 19, 7:13 pm, pps <[email protected]> wrote:
>> I've read it all through before asking my question. This answer is kind
>> of unrelated to my question.
> 
> No, Esa is spot on.
> 

Are you talking about google maps reference page link to overlay 
requirements? I repeat once again, it doesn't deal with inheritance. It 
deals with implementing a new overlay. Try to implement Rectangle as 
they do in the example, but implement it properly: Ractangle is a 
Polygon, so it should inherit from GPolygon and not created from scratch.
By the way, is it only me or everyone feels that. That gmaps api 
reference page is created in a way that makes me avoid visiting it if 
possible. On loading it freezes entire browser for seconds while their 
dog slow syntax hylighter does it's black job. I actually thought that I 
have some weird problems with my firefox, googled for "firefox slow" and 
reinstalled it completely! :) only after that I realized that it's the 
page's fault and not my firefox. WTF?? I have a q6600 cpu, I wonder how 
it feels on some more outdated cpu. Does it even load?? :))



>> GPolygon is a working fine, so I don't need
>> to add anything to it to make it work.
> 
> Yes, you do. Did you look at Esa's link?
> Quote from that link:
> "The GOverlay interface requires you to implement four abstract
> methods:"
> 
>> That means that if I properly
>> extend GPolygon I wouldn't need to implement these interfaces unless
>> implementations from GPolygon should be changed for GCircle.
> 
> No. It doesn't work like that. See Esa's link.
> 

Well, I don't see any reason. I call a Circle constructor, it calculates 
vrtices and internally calls constructor of GPolygon using calculated 
vertices. The rest GCircle should behave just like regular polygon. So, 
why would I need to implement anything that's already implemented in 
GPolygon and suits me well??

(pseudo syntax)

function animal {
        this.name = "animal";
}

animal.prototype.say = function(){ alert(this.name); }

function cat extends animal {
        animal(this);
        this.name = "cat";
}


Now, cat behaves like animal but changes constructor slightly. Do I need 
to modify say()? Probably I don't, so why would I need to do something 
like that if I inherit from GPolygon?... all I want is to inherit, 
modify constructor and keep the rest as is. The problem is that GPolygon 
is implemented is some weird way so that nothing works if you try to 
inherit from it. All gmaps code is chinese to me, they probably use some 
obfuscator or js compressor, so that I can't see what exactly goes on to 
understand what I need to do to inherit from GPolygon and not break all 
other code. If there was any good debugger so that I could step through 
the code and see what's up... but whatever I tried I couldn't use 
(something for Firefox opened me some five horizontal panes that made 
absolutely no sense to me, I didn't see call stack and I didn't see code 
itself ;))


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to