On 8 November 2010 08:05, ht <[email protected]> wrote: > > Message: 'window.opener.mapxy[...].xy.1' is null or not an object > > but array value "window.opener.mapxy[id]['xy'][1]" not null! it's > string (i try to conver to float type this value, but it no solve > error) "55.86565542965302" ... > > Where mistake?
This line for(id in window.opener.mapxy) is not the way to enumerate the elements of arrays in Javascript. It enumerates the properties of objects. What is the value of "id" when it fails? The underlying problem is that the first 176 elements of the array window.opener.mapxy ARE undefined. Perhaps IE enumerates all the elements whereas Firefox ignores the undefined ones. If you used the standard array-enumeration of for (id=0;id<window.opener.mapxy.length;id++) then you would force all browsers to start at zero and they would all behave the same. You can then cater for undefined elements confident that the code is browser independent. I also get this warning continually in Firefox: "The 'charCode' property of a keydown event should not be used. The value is meaningless." -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
