Mitchell, Steve
2010-Sep-28 22:00 UTC
[Mapstraction] Losing mxn.Mapstraction (clarification)
Did some debugging and found the root cause, but not the solution. Problem Statement The reference to mxn.Mapstraction is sometime null causing this statement to fail: map = new mxn.Mapstraction( elementId,''microsoft''); The global variable mxn exists, but mxn.Mapstraction is no longer defined. Running Chrome on Linux the map loads fine; however, using on-screen previous/next buttons to step through pages via anchor tags, "mxn.Mapstraction" does not exist when the previous or next page loads. The user must refresh the page in order for the map to appear. Running Safari on OS X the map often times does not initially load, but usually will appear if the page is refreshed. In both cases, the global variable mxn exists, but mxn.Mapstraction is undefined. I''m not sure how to assign mxn.core.js to mxn.Mapstraction after the fact. Any ideas? Steve ________________________________ This e-mail and any attachments may contain confidential material for the sole use of the intended recipient. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20100928/add662df/attachment.htm>
How are you including the JavaScript files and are you using an onload or domready handler? We''ve had trouble with the auto loading of scripts i.e. using mxn.js?(params here) format of script src. Derek On 28 September 2010 23:00, Mitchell, Steve <Steve.Mitchell at garmin.com>wrote:> Did some debugging and found the root cause, but not the solution. > > > > Problem Statement > > > > The reference to mxn.Mapstraction is sometime null causing this statement > to fail: > > > > map = new mxn.Mapstraction( elementId,''microsoft''); > > > > The global variable mxn exists, but mxn.Mapstraction is no longer defined. > > > > Running Chrome on Linux the map loads fine; however, using on-screen > previous/next buttons to step through pages via anchor tags, > ?mxn.Mapstraction? does not exist when the previous or next page loads. The > user must refresh the page in order for the map to appear. > > > > Running Safari on OS X the map often times does not initially load, but > usually will appear if the page is refreshed. > > > > In both cases, the global variable mxn exists, but mxn.Mapstraction is > undefined. I?m not sure how to assign mxn.core.js to mxn.Mapstraction after > the fact. > > > > Any ideas? > > > > Steve > > ------------------------------ > This e-mail and any attachments may contain confidential material for the > sole use of the intended recipient. If you are not the intended recipient, > please be aware that any disclosure, copying, distribution or use of this > e-mail or any attachment is prohibited. If you have received this e-mail in > error, please contact the sender and delete all copies. > > Thank you for your cooperation. > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >-- Derek Fowler m. +44 (0) 7966 512 369 e. dezfowler at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20101020/a301c483/attachment.htm>