Well, now that the RC of gwt-maps with the new API is out, it's time
for me to ask again (http://groups.google.com/group/Google-Web-Toolkit/
browse_thread/thread/c2c12a9b5b297f7a/fa8d113d1e00a4b5) for an issue I
have been struggling with for some time. Yesterday I had the
opportunity to ask Sumit Chandel about that in Madrid's GDD, and it
seems it's a kind of tricky problem.

I am trying to use the LabeledMarker library (JavaScript, not GWT)
with gwt-maps. That library provides a subclass of Marker,
LabeledMarker, and a subclass of MarkerOptions, LabeledMarkerOptions.
In order to use the library, the first approach I took was to modify
the gwt-maps source code so that the Marker class is always
instantiated as a LabeledMarker object (http://groups.google.com/group/
Google-Web-Toolkit/browse_thread/thread/
9f618c768dd6d126/1edaaf5c91f9aa9d). The obvious disadvantage of this
is that I have to patch the code everytime the gwt-maps library gets a
new update.

These are the guilties that take a role in this "programming soap
opera":

- The MarkerImpl interface, that extends JSFlyweightWrapper. It's the
wrapper of the original GMarker, that uses JSIO.
- The Marker class, which extends ConcreteOverlay. Uses MarkerImpl in
its constructor to create the JavaScript object.
- The MarkerOptions class, extends JavaScriptObject, declared final
and written using JSNI. Passed as an argument to the Marker
constructor.

Therefore:

- MarkerOptions cannot be subclassed because its final.
- A subclass of Marker would need a subclass of MarkerImpl that
pointed to the LabeledMarker JavaScript class. But that cannot be made
as the constructor of the Marker subclass is forced to call the Marker
constructor, that uses MarkerImpl. Is then any way to make the Marker
subclass call use a MarkerImpl subclass in its constructor?

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

Reply via email to