I responded to your post over in the Closure-compiler group, but here's an 
OverlayView class that fully compiles with Closure-Compiler using only the 
maps api v3 externs:
http://search.missouristate.edu/map/mobile/examples/tileoverlay_uncompressed.js

The number 1 trick is to properly export the prototypes that are required 
when you extend OverlayView so that they are not renamed.

These would be:

OverlayView.onAdd
OverlayView.onRemove
OverlayView.draw

You can export any method using the following notation:

MyOverlayView.prototype.onAdd = function() {}
MyOverlayView.prototype["onAdd"] = MyOverlayView.prototype.onAdd;

If the prototype is only for export (your code never calls it directly), you 
can shortcut the exporting with the following notation:

/** @this {MyOverlayView} */ 
MyOverlayView.prototype["onAdd"] = function() {}

The @this annotation is required to prevent a warning - without it the 
compiler will think that the "this" keyword refers to the global scope. Also 
note that with these OverlayView methods, you will also need the @override 
annotation.

Chad Killingsworth

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

Reply via email to