Permlink Replies: 1 - Pages: 1 - Last Post: 13 Feb 26, 18:36 Last Post By: Laza
phil44

Posts: 170
Registered: 18-Jun-2010
Bug report: The map is not displayed due to a GPX parsing error.
Posted: 13 Feb 26, 10:35
  Click to reply to this thread Reply
Seen with Tiger 7.4.7

I noticed that the map did not display when I viewed an album with GPX tracks from a remote server. After some investigation, I pinpointed the problem:

In the loadOverlays function ( laza.addmap.js/laza.adddosmmap.js:164 ), xhr.responseXML is null in the response returned by the server! I think the server is returning a malformed response because this problem doesn't occur with the local album or other servers.

A possible fix, according to https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML, is to force the MIME type in the request:
xhr.open('GET', overlays[0], true);
xhr.overrideMimeType("text/xml");  // Forces the response to be parsed as XML
I tested it, it works :)
Laza

Posts: 1,464
Registered: 6-Sep-2005
Re: Bug report: The map is not displayed due to a GPX parsing error.
Posted: 13 Feb 26, 18:36   in response to: phil44 in response to: phil44
  Click to reply to this thread Reply
Oh, great! It's a pleasure to give support to you. :)
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums