• Resolved willpom

    (@willpom)


    Hi

    I’m trying to migrate from WP-GPX-Maps but without success. Can you give me some help?

    The shortcode I currently use is
    [sgpx gpx=”/wp-content/uploads/gpx/#_ATT{Code}.gpx”]
    where #_ATT{Code} is read by the event plugin that is rendering the page.

    I tried using the Migrate from but nothing happened, just a map focused on default Leaflet co-ords

    I restructured the shortcode to
    [leaflet-map][elevation gpx=”/wp-content/uploads/gpx/#_ATT{Code}.gpx”]
    I’ve tried adding a full url to a specific file, same result.

    It works however in a new page using gpx=”/wp-content/uploads/gpx/600bcm.gpx for example.

    Any advice why it wouldn’t work in the event plugin?

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

    (@hupe13)

    The shortcode elevation can only load files from URL.
    Raruto, the author of leaflet-elevation, has an example uploading a file, maybe that is a starting point for the problem.

    Thread Starter willpom

    (@willpom)

    I’m not a coder so that is gobbledy gook to me.

    The #_ATT{Code} passes eg. 600bcm which corresponds to a gpx in the correct folder (works fine with WP-GPX-maps).

    But even if I put ”/wp-content/uploads/gpx/600bcm.gpx” or the corresponding full URL into the event template it will only show a leaflet map of the default coordinates.

    If I test on a new page it will display.

    Plugin Author hupe13

    (@hupe13)

    Please try

    [leaflet-map fitbounds]
    [elevation gpx=...]

    Do you have a link to a test page?

    Thread Starter willpom

    (@willpom)

    Test page… I was working on a non event draft page where it displays. If I publish it however, public, private or password it doesn’t display. Tried on Firefox, Edge & Chrome all the same. Deactivated the event leaflet plugin for event location pages, & WP-GPX-Map with no effect.

    So I investigated with an event and flipped a test one to draft. It works and parses the #_ATT{Code} correctly.

    fitbounds… no GPX track is displayed so there aren’t any bounds to fit; which is set to on in Leaflet Map settings anyway.

    As the ‘map’ is in the event template this is all live at the mo so no routes displaying, just my default lat, long for Bristol.

    Published test non event page https://www.pedalution.co.uk/leaflet-elevation-test

    Thread Starter willpom

    (@willpom)

    Thread Starter willpom

    (@willpom)

    PS the slope shading doesn’t make sense, it should be between the line and 0% or none at all.

    Plugin Author hupe13

    (@hupe13)

    The mime type is false. If I load the gpx file, the browser shows the content, but it should save. see https://wordpress.org/plugins/extensions-leaflet-map/#my%20gpx%20file%20is%20not%20displayed%21

    Maybe this is the cause: the event plugin passes the gpx file with the wrong mime type.

    You seems to use a caching plugin. The JS files from the Leaflet Map plugins are not cached, but try to turn off the caching for testing.

    Thread Starter willpom

    (@willpom)

    It was the ComplianZ GDPR/Privacy plugin. Even though the wizard set up had OSM cookies listed, in integrations I had to disable a Cookie Blocker which had a placeholder acceptance enabled for OSM, yet the placeholder wasn’t called.

    The other OSM plugin mentioned above though worked fine with this setting enabled.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Help migrating from WP-GPX-Maps’ is closed to new replies.