× Forum for the GPXTrackMap Content Plugin for Joomla! 2.5 and 3.x

Elevation Colors

fingeradmin replied the topic: Elevation Colors

7 years 4 months ago

Hoi Pascal,

very glad you have it sorted out now! :)

If the Dutch translation is misleading, maybe you can help to enhance it: i'm open to any suggestions, and i'll gladly include them in the next release.


About the cached vs. non-cached settings:

You are right, this is not very obvious.

Some of the settings affect the OpenLayers code that gets (re-)generated on every page call "on the fly", anyway. These are "cheap", because they only affect the HTML/JavaScript output. No physical file on the server's disk needs to be changed for these settings to take affect.

Changes to the diagram settings are pretty "expensive" (in comparison): The rendering of the .SVG file takes time. Calculations need to be done, a new SVG file has to be rendered and saved to the server's disk and then has to be re-sent to your end-users (who may have the same diagram in their browser cache already...)

So: if the plugin would do the (re-)rendering over and over again on every single page load, re-rendering diagrams would slow down the load time of every one of your pages considerably, even though nothing has changed since the last call.

It's a "mixed calculation" between being as "fast" and "up-to-date" as possible ;)

But now you know how it works, i hope you'll be fine with turning the cache options in the plugin off (to make changes) and then back on (once they have settled) so you can have good page load speeds, AND the ability to change things as you need them. :)

cheers, Frank

Last edit: 7 years 4 months ago by fingeradmin.

Please Log in or Create an account to join the conversation.

tux replied the topic: Elevation Colors

7 years 4 months ago

Hoi Frank,

Fixed!! :woohoo:

Your last post was the final push in the right direction.
First: I never realised that the .svg files never changes when you change something in the plugin. This was some very useful information.

I'm using the Dutch translation file, and thats where it goes wrong.
The translation in the Elevation Profile tab is this:

Vul modes: geen opvulling
cumulatief (stijging/dalen)
absoluut


The discription near the Fill Modus is:
Hoe wordt de ruimte onder de hoogteprofiel ingevuld. Absoluut mode gebruikt de bergop kleur. Waardes: [0|1|2]

The Dutch discription is very cryptic :huh: (it doesn't make much sense at all) I'v changed these settings quite often to see the result, but as I never deleted the .svg files (and Joomla cache), I also never saw any changes in the elevation diagram ;) . And I was (now) using the absolute option..

So now I've deleted all the .svg files, cleared the Joomla cache, changed the fill modus to delta (up/down) --> cumulatief (stijging/dalen) Reloaded the page and Yess!! The colours are all back!

See here: tinyurl.com/z2ccjws

By the way: when you change the map control options in the plugin, without deleting the .svg files, this change you will see directly when reloading the webpage. That's odd..

But in the end, we solved the issue! :woohoo:
And I've learned more about the plugin settings and behaviour. :lol:

Thanks (again) for helping me out!

Cheers!
Pascal

Please Log in or Create an account to join the conversation.

fingeradmin replied the topic: Elevation Colors

7 years 4 months ago

Hoi Pascal,

looking at the elevation diagrams on your site again...

could it be that you have set the option "Fill mode"
in the Elevation diagram options to "absolute" instead of "delta (up/down)" ?
(or you have "edfillmode=2" in the invocation code or in your Parameter presets?)

In that case the plugin will use only the "up" color (green):
The lowest parts of the track will be almost white, the highest parts
will be completely green (100% saturation).

I can't think of any other reason... :unsure:

cheers, Frank

The following user(s) said Thank You: tux

Please Log in or Create an account to join the conversation.

fingeradmin replied the topic: Elevation Colors

7 years 4 months ago

Hoi Pascal,

judging from what you wrote, you have set everything up all right and all should be fine.

Honestly, I am running out of tipps/ideas here :(

(I just tried to update my local test installation to J3.6.4, but the upgrade failed... i'll try a "fresh" 3.6.4 installation within the next days, will let you know whatever i find.)

Is anybody else here facing similar problems after upgrading to J 3.6.4 ?

cheers, Frank

P.S. / EDIT: It's normal and "as expected" that the .svg files are re-created.
BUT: they should be re-created with the colors you have set in the Plugin options! That's the thing i can't figure out right now...

Last edit: 7 years 4 months ago by fingeradmin.

Please Log in or Create an account to join the conversation.

tux replied the topic: Elevation Colors

7 years 4 months ago

Hoi Frank,

I've played around with that, but it does not solve the issue.

When I set the cache option in the plugin to no, delete the .svg files, clear the Joomla cache (must do!), the .svg files are stil created :huh:

For testing I deleted both the .svg files from both the links. Despite the no cahce option in the plugin, the .svg file is still beeing created and to make it more weird: both the elevation diagrams are now green all over :S !

I'm using the plain HTML color names for it: red and green. I'm really wondering where both the green options are coming from.

To me it looks like the plugin is not beeing used / read well by Joomla (3.6.4)? Otherwise the caching option and the colors should be working..

Just thought of something.. the older tracks on the website have been created with an older veriosn of the plugin. Could that be someting?

Pascal

Attachments:
Last edit: 7 years 4 months ago by tux. Reason: aditional info

Please Log in or Create an account to join the conversation.

fingeradmin replied the topic: Elevation Colors

7 years 4 months ago

Hoi Pascal,

hmm, that's weird. One thing you should be aware of (and that may already solve your problem):

Changing the "Up area Color" and "Down area color" in the Elevation diagram part of the plugin settings will NOT have an effect on diagrams that were already calculated, UNLESS you have set the "Use cached files" option in the Advanced settings to "No".

Clearing the Joomla cache will also have no effect, since the pre-rendered .svg files are not in the Joomla cache. They are created and stored in the directory where your .gpx files are (by default: /images/gpxtracks).

So to force the .svg diagrams to be rendered with changed colours or other settings, you can just delete the .svg files from the gpxtracks directory and the plugin will re-create them with the current settings.

Also make sure you have valid HTML color names or HTML #rgb codes in the "Up area color" and "Down area color" fields.

While you are playing around with settings, you can set the "Use cached files" option to "No". That way the .zip and .svg files will be re-created every time you visit (or refresh) the page.

Once you have the settings the way you want them, you should
a) delete all the .svg files in the gpxtracks directory and then
b) turn the "Use cached files" option back to "Yes".

That way you should have all the diagrams with the same settings.

hth & cheers, Frank

Attachments:

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum