cool. I guess my main worry would be that a developer that saw this
(from the the demo page):

GEvent.addListener(map,"sorrytiles",function(){
                                GLog.write("You almost saw sorry tiles, but 
you've been saved!");
                                map.setZoom(map.getZoom()-1);
                        });

would naturally assume that the "sorrytiles" event was part of the
api, and wouldnt realize that it wasn't until they dug further into
the code.

I guess the natural thing to do then, would be to namespace the event.
something like "ux_sorrytiles" or "com.mypackage.events.sorrytiles".
that would make it quite clear it probably was custom, but also feels
a little cumbersome-

On Apr 12, 6:15 pm, Andrew Leach <[email protected]>
wrote:
> On Apr 12, 10:51 pm, Esa <[email protected]> wrote:
>
>
>
> > That is even more convenient than using the official
> > getMaxZoomAtLatLng() method. Brilliant.
>
> It is. And getErrorMessage() is 
> documentedhttp://code.google.com/apis/maps/documentation/reference.html#GMapTyp...
> so it's unlikely to break in the future. Definitely a useful companion
> to getMaxZoomAtLatLng().
>
> To answer the question, I think custom events are A Good Thing.
> Naturally, they need to be named sensibly and the code should contain
> useful comments; but that goes for all coding!

-- 
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