Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with displaying a large track (multitrack) #176

Closed
wpysz opened this issue Feb 8, 2022 · 2 comments
Closed

Problem with displaying a large track (multitrack) #176

wpysz opened this issue Feb 8, 2022 · 2 comments

Comments

@wpysz
Copy link

wpysz commented Feb 8, 2022

Starting with [email protected] no large GPX files are displayed. For version 1.5.6, everything worked fine. All subsequent versions, up to 1.7.6, have a problem with displaying a track larger than 1-1.5 MB.

My environment

  • leaflet-elevation: 1.5.6 - 1,7,6
  • leaflet: 1.7.1
  • browser: all
  • operating system: Windows 10

Three examples

A/ leaflet-elevation 1.5.6 - track GPX 3 MB (It's good )
https://ciekawe.tematy.net/testy/raruto/156/test-1.5.6.html

B/ leaflet-elevation 1.7,6 - track GPX 1 MB (It's good )
https://ciekawe.tematy.net/testy/raruto/156/test-1.7.6-1mb.html

C/ leaflet-elevation 1.7,6 - track GPX 3 MB (There is no track or graph; also for 1.6.0, 1.6.1, etc. )
https://ciekawe.tematy.net/testy/raruto/156/test-1.7.6-3mb.html

JS script

The JS script is identical in all examples, the name of the GPX file differs.

var opts = {
  map: {
    center: [48.32, 24.67],zoom: 10,
  },
  elevationControl: {
    url: "https://ciekawe.tematy.net/testy/raruto/156/track-3MB.gpx",
    options: {
      downloadLink: false,
      legend: false,
    },
  },
};
var map = L.map('map', opts.map);
var controlElevation = L.control.elevation(opts.elevationControl.options);
controlElevation.addTo(map);
controlElevation.load(opts.elevationControl.url);
@velocat
Copy link
Contributor

velocat commented Feb 8, 2022

Hi, your track consists of two segments. If you make it single-segment, it will be displayed normally

From Line #7112:

<trkpt lat="48.2556360" lon="24.5391436">
  <ele>1000.190979</ele>
  <time>2021-08-03T11:45:01.000Z</time>
</trkpt>

</trkseg> <-- Delete this
<trkseg> <-- Delete this

<trkpt lat="48.2556003" lon="24.5392026">
  <ele>1000.763000</ele>
  <time>2021-08-03T11:47:49.000Z</time>
</trkpt>

<trkpt lat="48.2555780" lon="24.5392720">

The problem with multitracks is still relevant: #56

@wpysz
Copy link
Author

wpysz commented Feb 8, 2022

Thanks. I didn't come up with this because I rarely create multi-segment tracks. After changing the file, it is already displayed.
https://ciekawe.tematy.net/testy/raruto/156/test-1.7.6-3mb-1seg.html

@wpysz wpysz closed this as completed Feb 8, 2022
@Raruto Raruto changed the title Problem with displaying a large track Problem with displaying a large track (multitrack) Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants