There have been a couple of posts about this, and so far the answer has been to programmatically try to detect the presence of the "We are sorry..." tiles. It occurred to me however, that there would be a much cleaner approach to this problem, using custom events.
I've put a demo here: http://chrismarx.appspot.com/google/maps/demos/sorrytilesdemo.html which shows it in action. The basic idea is to overwrite the function that is called for returning the error message, and instead, triggering a custom event. G_NORMAL_MAP.getErrorMessage = function() { GEvent.trigger(map,"sorrytiles"); return ""; } You can then setup a listener for that event just as you would for any other event. Referenced posts: 1. http://groups.google.com/group/google-maps-api/browse_thread/thread/3b4c9070fc08b9b9/8b0ddc0f9633e5b8?lnk=gst&q=detect+we+are+sorry#8b0ddc0f9633e5b8 2. http://groups.google.com/group/google-maps-api/browse_thread/thread/77c710936f7b917a/729637326b906dd3?lnk=gst&q=we+are+sorry+tile#729637326b906dd3 PS - as a side note, I'm wondering if there are developers out there who have structured their code around custom events and how they document or keep track of the custom events they've created. Does using the observer pattern in this environment make the code harder to follow for future developers? Easier? -- 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.
