• Resolved wwccscorer

    (@wwccscorer)


    Would it be possible to add the undocumented options yAxisMin and yAxisMax to allow similar y axix scales to be shown on elevation profiles displayed in multiple posts/pages?

    I have done this in my copy of the code by duplicating the height section of php/elevation.php :-

    // Line 83 src/options.js
    		// yAxisMax
    		array(
    			'param' => 'yAxisMax',
    			'shortdesc' => __('y Axis Max',"extensions-leaflet-map"),
    			'desc' => "",
    			'default' => "0",
    			// form input type,  pattern, help
    			'values' => 'type="text" pattern="^[0-9]+$" title="'.__('number','extensions-leaflet-map').'"',
    			'typ' => array('changeable','look','multielevation'),
    		),
    
    		// yAxisMin
    		array(
    			'param' => 'yAxisMin',
    			'shortdesc' => __('y Axis Min',"extensions-leaflet-map"),
    			'desc' => "",
    			'default' => "0",
    			// form input type,  pattern, help
    			'values' => 'type="text" pattern="^[0-9]+$" title="'.__('number','extensions-leaflet-map').'"',
    			'typ' => array('changeable','look','multielevation'),
    		),

    I am not sufficiently knowledgable to be sure if this is the correct way to do it and what the defaults should be (‘undefined’ in src/options.js). It would also be nice not to have to remember to redo this if I update the WP plugin.

    Many thanks,

    Simon

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author hupe13

    (@hupe13)

    It will be in the next version. Thank you for the suggestion.

    Thread Starter wwccscorer

    (@wwccscorer)

    Thanks for your rapid and positive response.

    Cheers,

    Simon

    Thread Starter wwccscorer

    (@wwccscorer)

    I am sorry to start asking for yet more but would it be possible to add the width parameter to the elevation profile (height is already there) so that I can make profiles which are the same width as the wide maps I can create?

    Thanks for your time in looking at this,

    Kind Regards,

    Simon

    Plugin Author hupe13

    (@hupe13)

    The option width is only valid, if the chart is not detached:

    [leaflet map fitbounds]
    [elevation gpx=... !detached width=...]

    Is this what you want? But I can add it.

    Thread Starter wwccscorer

    (@wwccscorer)

    Thank you for the “!detached” information. It explains why I couldn’t make the width option work on my test site. It’s not what I first thought but it looks better than I expected.

    It would be nice if you could add it but only if it’s not too much trouble for you.

    Thanks again,

    Simon

    Plugin Author hupe13

    (@hupe13)

    Version 3.5 is released.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Elevation Y Axis’ is closed to new replies.