• Resolved laurentl06

    (@laurentl06)


    Hi,

    I have another question regarding customizing symbols in Elevation Profiles settings.

    When I set my icon (named “localisation”) in the Setting fields of the Customize waypoints tab, nothing happens (with “iconSize: [50, 50],” for example). My “location” icon is 100X100 pixels. I tried to configure this icon in CSS (.location), I also have no results.

    I can’t find an answer to solve this problem. Thank you for your help.

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

    (@hupe13)

    You can customize your icons in the admin backend: /wp-admin/admin.php?page=extensions-leaflet-map&tab=elevationwaypoints

    iconSize and more options you can customize in the settings. Javascript is generated from this.

    I admit that and the documentation is complicated, but I have not found another solution. I will change my example page to show this settings.

    Thread Starter laurentl06

    (@laurentl06)

    I followed exactly the instructions you describe, but nothing happens with this code in Settings: iconSize: [50,50], iconAnchor: [5,5], popupAnchor: [5,-5], in Javascript box for my icon.

    Plugin Author hupe13

    (@hupe13)

    Do you have a link to a test page?

    Thread Starter laurentl06

    (@laurentl06)

    Plugin Author hupe13

    (@hupe13)

    Try [elevation .... wptIcons=defined ....]. I see, I must write a better documentation.

    I’ve been there before, a very nice place ??

    Thread Starter laurentl06

    (@laurentl06)

    Thank you Hupe13. I am not a coding specialist. Can you specify the syntax of the code to use. I don’t know how to include my text. Maybe like this? : [elevation-waypoint-icon.localisation wptIcons=defined iconSize: [50,50], iconAnchor: [5,5], popupAnchor: [5,-5]]

    Thank you for my test page but it’s just an example…

    Plugin Author hupe13

    (@hupe13)

    I mean: To display the map with an elevation profile you are using the shortcode [elevation ....]. Has this shortcode command the option wptIcons=defined in it?

    Thread Starter laurentl06

    (@laurentl06)

    No, my shortcode doesn’t command this option (wptIcons=defined). Here’s my shortcode :

    [leaflet-map fitbounds scrollwheel]
    [layerswitch providers="Thunderforest"]
    [elevation gpx="https://www.alpes-sud-photos.com/dev/wp-content/uploads/2023/01/GR4_ETAPE_24_5.gpx"]
    [fullscreen]
    [zoomhomemap]
    
    <style>
    .elevation-waypoint-icon.localisation:before {
    	background: url(https://www.alpes-sud-photos.com/dev/wp-content/uploads/2023/01/localisation.png) no-repeat 50%/contain;
    }
    .elevation-waypoint-icon.icon-jaune:before {
    	background: url(https://www.alpes-sud-photos.com/dev/wp-content/uploads/2023/01/icon_jaune.png) no-repeat 50%/contain;
    }
    </style>
    Plugin Author hupe13

    (@hupe13)

    Write: [elevation gpx="https://www.alpes-sud-photos.com/dev/wp-content/uploads/2023/01/GR4_ETAPE_24_5.gpx" wptIcons=defined]

    • This reply was modified 2 years, 1 month ago by hupe13. Reason: typo
    Thread Starter laurentl06

    (@laurentl06)

    Great it works, thank you very much hupe13.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Customization icons with settings in Javascript’ is closed to new replies.