- Posts: 37
- Thank you received: 0
Elevator Chart not shown
- ClemSchn
- Topic Author
- Offline
- Junior Member
-
Less
More
6 months 20 hours ago - 6 months 20 hours ago #16384
by ClemSchn
Elevator Chart not shown was created by ClemSchn
Hello Dima,
1. I have the problem that the elevation profile graphic is not displayed under the map. In addition, the colour setting and the thickness of the line for the track are not taken from the defined settings.
clemensschnitzler.eu/touren/tagestouren/312-zum-kornsand.html
I would be very grateful if you could help me with the solution.
2. when installing with a different template, the graphic is displayed, but the settings for the colour and thickness of the line are not applied there either.
c-schnitzler.eu/touren/tagestouren/zum-kornsand.html
The same GPX data is available for both installations. The latest versions of Joomla 5 and Zh OpenStreetMap are installed.
Many thanks for your support
1. I have the problem that the elevation profile graphic is not displayed under the map. In addition, the colour setting and the thickness of the line for the track are not taken from the defined settings.
clemensschnitzler.eu/touren/tagestouren/312-zum-kornsand.html
I would be very grateful if you could help me with the solution.
2. when installing with a different template, the graphic is displayed, but the settings for the colour and thickness of the line are not applied there either.
c-schnitzler.eu/touren/tagestouren/zum-kornsand.html
The same GPX data is available for both installations. The latest versions of Joomla 5 and Zh OpenStreetMap are installed.
Many thanks for your support
Last edit: 6 months 20 hours ago by ClemSchn.
Please Log in or Create an account to join the conversation.
- Dima
-
- Offline
- Platinum Member
-
5 months 4 weeks ago #16388
by Dima
Don't forget support my developments: post review in JED , donate , help with translation
Replied by Dima on topic Elevator Chart not shown
I can see that on your map without elevation - page contains errors and "unreachable code after return statement".
Probably some plugins breaks code
Probably some plugins breaks code
Don't forget support my developments: post review in JED , donate , help with translation

Please Log in or Create an account to join the conversation.
- ClemSchn
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 37
- Thank you received: 0
5 months 4 weeks ago - 5 months 4 weeks ago #16390
by ClemSchn
Replied by ClemSchn on topic Elevator Chart not shown
I have a complete new installation with the newest joomla version and only with the component of zh openstreetmap and the templates Amazed Photography and Cassiopeia.
With the Cassiopeia Template its all fine. There i see the map and the elevation chart:
c-schnitzler.de/index.php/foto/test/test
With the template Amazed Photography i only get the map:
c-schnitzler.de/index.php/foto/fotowalks/kornsand
Please be so kind and have a look.
Maybe you can tell me what needs to be changed in order to see the map and the elevation chart in the Amazed Photography template.
Regards
Clemens
With the Cassiopeia Template its all fine. There i see the map and the elevation chart:
c-schnitzler.de/index.php/foto/test/test
With the template Amazed Photography i only get the map:
c-schnitzler.de/index.php/foto/fotowalks/kornsand
Please be so kind and have a look.
Maybe you can tell me what needs to be changed in order to see the map and the elevation chart in the Amazed Photography template.
Regards
Clemens
Last edit: 5 months 4 weeks ago by ClemSchn. Reason: Completed
Please Log in or Create an account to join the conversation.
- Dima
-
- Offline
- Platinum Member
-
5 months 3 weeks ago #16409
by Dima
Don't forget support my developments: post review in JED , donate , help with translation
Replied by Dima on topic Elevator Chart not shown
Hi Clemens
I can tell again - your page contains errors and warnings.
I can see that elevation div is not filled (initialized).
I can tell again - your page contains errors and warnings.
I can see that elevation div is not filled (initialized).
Don't forget support my developments: post review in JED , donate , help with translation

Please Log in or Create an account to join the conversation.
- DBuehler
- Offline
- New Member
-
Less
More
- Posts: 1
- Thank you received: 0
1 week 5 days ago - 1 week 5 days ago #16777
by DBuehler
Replied by DBuehler on topic Elevator Chart not shown
Hi Dima
I was looking into this issue for Mr. Clemens Schnitzler and came to the following findings:
When Leaflet‑Elevation’s _loadModules calls its internal _registerHandler, it iterates over a handlers array using Underscore’s _.each. Because s5_flex_menu‑min.js globally extends Array.prototype with extra enumerable functions, those prototype methods are treated as array entries — causing Leaflet‑Elevation to invoke _registerHandler on unrelated functions. Only the six intended handler functions (Distance, Time, Altitude, Slope, Speed, Acceleration) should be registered; everything else should be ignored.
Steps to Reproduce
1. Load a page that includes both Leaflet‑Elevation and s5_flex_menu‑min.js. -> For example: c-schnitzler.eu/touren/tagestouren/312-zum-kornsand.html
2. Observe console error
3. Insert a breakpoint or console.trace() in Array.prototype.clean to view the call stack.
4. You’ll see _loadModules → _.each(handlers, …) invoking _registerHandler on functions defined in s5_flex_menu‑min.js.
Expected Behavior
Only the six elevation‑specific handler functions defined by Leaflet‑Elevation should be passed into _registerHandler. Prototype methods added by unrelated scripts (e.g., s5_flex_menu) must not be iterated or registered.
Actual Behavior
Because s5_flex_menu‑min.js pollutes Array.prototype with additional enumerable functions, _.each includes those functions in the iteration. Leaflet‑Elevation’s _registerHandler is therefore called on unexpected handlers, breaking downstream logic.
Root Cause Analysis
Prototype Pollution: s5_flex_menu‑min.js extends Array.prototype (adding custom methods) in a way that makes them enumerable.
Iteration Method: Underscore’s _.each iterates over all enumerable properties (including inherited ones) when arrays have prototype extensions.
Handler Registration Logic: Leaflet‑Elevation assumes only its own handler functions exist in the handlers array; it does not filter out inherited prototype properties.
I saw that you are using a many years old version of Leaflet‑Elevation (@raruto/leaflet‑elevation). Maybe in more recent versions, Leaflet‑Elevation solved the each with the .each iteration, but I haven't investigated that.
Can you reproduce the issue on your side? How would you suggest to continue? Is updating to the latest version of Leaflet‑Elevation an option for you?
Edit: We noticed that this thread here is currently located in the Zh GoogleMap section, but concerns the Zh OpenStreetmap section.
I was looking into this issue for Mr. Clemens Schnitzler and came to the following findings:
When Leaflet‑Elevation’s _loadModules calls its internal _registerHandler, it iterates over a handlers array using Underscore’s _.each. Because s5_flex_menu‑min.js globally extends Array.prototype with extra enumerable functions, those prototype methods are treated as array entries — causing Leaflet‑Elevation to invoke _registerHandler on unrelated functions. Only the six intended handler functions (Distance, Time, Altitude, Slope, Speed, Acceleration) should be registered; everything else should be ignored.
Steps to Reproduce
1. Load a page that includes both Leaflet‑Elevation and s5_flex_menu‑min.js. -> For example: c-schnitzler.eu/touren/tagestouren/312-zum-kornsand.html
2. Observe console error
3. Insert a breakpoint or console.trace() in Array.prototype.clean to view the call stack.
4. You’ll see _loadModules → _.each(handlers, …) invoking _registerHandler on functions defined in s5_flex_menu‑min.js.
Expected Behavior
Only the six elevation‑specific handler functions defined by Leaflet‑Elevation should be passed into _registerHandler. Prototype methods added by unrelated scripts (e.g., s5_flex_menu) must not be iterated or registered.
Actual Behavior
Because s5_flex_menu‑min.js pollutes Array.prototype with additional enumerable functions, _.each includes those functions in the iteration. Leaflet‑Elevation’s _registerHandler is therefore called on unexpected handlers, breaking downstream logic.
Root Cause Analysis
Prototype Pollution: s5_flex_menu‑min.js extends Array.prototype (adding custom methods) in a way that makes them enumerable.
Iteration Method: Underscore’s _.each iterates over all enumerable properties (including inherited ones) when arrays have prototype extensions.
Handler Registration Logic: Leaflet‑Elevation assumes only its own handler functions exist in the handlers array; it does not filter out inherited prototype properties.
I saw that you are using a many years old version of Leaflet‑Elevation (@raruto/leaflet‑elevation). Maybe in more recent versions, Leaflet‑Elevation solved the each with the .each iteration, but I haven't investigated that.
Can you reproduce the issue on your side? How would you suggest to continue? Is updating to the latest version of Leaflet‑Elevation an option for you?
Edit: We noticed that this thread here is currently located in the Zh GoogleMap section, but concerns the Zh OpenStreetmap section.
Last edit: 1 week 5 days ago by DBuehler.
Please Log in or Create an account to join the conversation.
- Dima
-
- Offline
- Platinum Member
-
1 week 1 day ago #16778
by Dima
Don't forget support my developments: post review in JED , donate , help with translation
Replied by Dima on topic Elevator Chart not shown
Hi
I can check what current version of "Leaflet‑Elevation" extension is, and, can add link to the last version of it.
Misbehavior of the third party extensions - it is not mine problem, I just use "Leaflet‑Elevation" as is for my extension.
I will post there if I will do release with fresh version of it.
I can check what current version of "Leaflet‑Elevation" extension is, and, can add link to the last version of it.
Misbehavior of the third party extensions - it is not mine problem, I just use "Leaflet‑Elevation" as is for my extension.
I will post there if I will do release with fresh version of it.
Don't forget support my developments: post review in JED , donate , help with translation

Please Log in or Create an account to join the conversation.
Time to create page: 0.306 seconds