Title: Customization icons with settings in Javascript
Last modified: January 19, 2023

---

# Customization icons with settings in Javascript

 *  Resolved [laurentl06](https://wordpress.org/support/users/laurentl06/)
 * (@laurentl06)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/customization-icons-with-settings-in-javascript/)
 * 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](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/customization-icons-with-settings-in-javascript/#post-16388581)
 * 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](https://leafext.de/en/elevation/wpts/?waypoints=1&wptLabels=1&wptIcons=defined)
   to show this settings.
 *  Thread Starter [laurentl06](https://wordpress.org/support/users/laurentl06/)
 * (@laurentl06)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/customization-icons-with-settings-in-javascript/#post-16388619)
 * 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](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/customization-icons-with-settings-in-javascript/#post-16388640)
 * Do you have a link to a test page?
 *  Thread Starter [laurentl06](https://wordpress.org/support/users/laurentl06/)
 * (@laurentl06)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/customization-icons-with-settings-in-javascript/#post-16388729)
 * Yes : [https://www.alpes-sud-photos.com/dev/test-pour-divi/](https://www.alpes-sud-photos.com/dev/test-pour-divi/)
 *  Plugin Author [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/customization-icons-with-settings-in-javascript/#post-16388940)
 * Try `[elevation .... wptIcons=defined ....]`. I see, I must write a better documentation.
 * I’ve been there before, a very nice place 😉
 *  Thread Starter [laurentl06](https://wordpress.org/support/users/laurentl06/)
 * (@laurentl06)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/customization-icons-with-settings-in-javascript/#post-16389303)
 * 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](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/customization-icons-with-settings-in-javascript/#post-16389316)
 * 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](https://wordpress.org/support/users/laurentl06/)
 * (@laurentl06)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/customization-icons-with-settings-in-javascript/#post-16389401)
 * No, my shortcode doesn’t command this option (`wptIcons=defined`). Here’s my 
   shortcode :
 *     ```wp-block-code
       [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](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/customization-icons-with-settings-in-javascript/#post-16389409)
 * 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 3 years, 4 months ago by [hupe13](https://wordpress.org/support/users/hupe13/).
      Reason: typo
 *  Thread Starter [laurentl06](https://wordpress.org/support/users/laurentl06/)
 * (@laurentl06)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/customization-icons-with-settings-in-javascript/#post-16389452)
 * 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.

 * ![](https://ps.w.org/extensions-leaflet-map/assets/icon-256x256.png?rev=3067862)
 * [Extensions for Leaflet Map](https://wordpress.org/plugins/extensions-leaflet-map/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/extensions-leaflet-map/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/extensions-leaflet-map/)
 * [Active Topics](https://wordpress.org/support/plugin/extensions-leaflet-map/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/extensions-leaflet-map/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/extensions-leaflet-map/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [laurentl06](https://wordpress.org/support/users/laurentl06/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/customization-icons-with-settings-in-javascript/#post-16389452)
 * Status: resolved