I''m hoping someone can take a quick look at this page and tell me if there are any glaring errors that might save me hours of trial and error. The Google maps implementation (which I did not write) stops rendering and throws the following error when prototype is added to the page. "Value undefined (result of expression a.lng) is not object http://maps.google.com/intl/en_us/mapfiles/97/maps2.api/main.js Line: 436" I understand that .lng is a function of GLatLng objects used in determining pixel locations for map.setCenter(), but I''m not understanding what effect prototype is having on the "a" object. Any kind of help or pointers would be much appreciated. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
It sounds to me as though they (Google) may be using for .. in on an array. Have you tried adding prototype after the Google map code, so their bit is already done by the time Prototype starts extending every element in sight? Walter On Feb 28, 2008, at 12:25 PM, lunaport wrote:> "Value undefined (result of expression a.lng) is not object > http://maps.google.com/intl/en_us/mapfiles/97/maps2.api/main.js > Line: 436" >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Yes, that makes sense. So it''s basically this issue: http://mg.to/2006/05/20/prototype-vs-web-2-0 Thanks for pointing me in the right direction. http://mg.to/2006/05/20/prototype-vs-web-2-0 On Feb 28, 11:42 am, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> It sounds to me as though they (Google) may be using for .. in on an > array. Have you tried adding prototype after the Google map code, so > their bit is already done by the time Prototype starts extending > every element in sight? > > Walter > > On Feb 28, 2008, at 12:25 PM, lunaport wrote: > > > "Value undefined (result of expression a.lng) is not object > >http://maps.google.com/intl/en_us/mapfiles/97/maps2.api/main.js > > Line: 436"--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Turns out it wasn''t actually interfering with GMaps js, but the way markers were being created by using a for... in statement on an Array, which was being extended by prototype. Using a for (i=0;i<x.length;i+ +) loop fixed it. Thanks again for the tip. You saved me a lot of time and frustration. Brian On Feb 28, 11:42 am, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> It sounds to me as though they (Google) may be using for .. in on an > array. Have you tried adding prototype after the Google map code, so > their bit is already done by the time Prototype starts extending > every element in sight? > > Walter > > On Feb 28, 2008, at 12:25 PM, lunaport wrote: > > > "Value undefined (result of expression a.lng) is not object > >http://maps.google.com/intl/en_us/mapfiles/97/maps2.api/main.js > > Line: 436"--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---