• Hi, the plugin is great! But I have the issue when importing the data from Geojson is not importing the markers color. I have several points on the map and the [leaflet-marker svg=”true” background=”red”] is not working. What am I doing wrong?

    [leaflet-map zoom=12 fitbounds lat=-12.0568 lng=-77.1167 scrollwheel tileurl="https://stamen-tiles.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png" leaflet-marker svg="true" background="red"] 
     [leaflet-geojson src=https://gist.githubusercontent.com/dalf22/65ae4cb48054b60ad3a320cfca63047e/raw/4c6b9019a9e99ce0d112c6287b827fa9c7795126/map.geojson]{popup-text}[/leaflet-geojson]
    • This topic was modified 3 years, 8 months ago by dalf22.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor hupe13

    (@hupe13)

    The shortcode is not correct:

    [leaflet-map zoom=12 fitbounds lat=-12.0568 lng=-77.1167 scrollwheel tileurl="https://stamen-tiles.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png"]
    [leaflet-marker svg="true" background="red"] 
    [leaflet-geojson src=https://gist.githubusercontent.com/dalf22/65ae4cb48054b60ad3a320cfca63047e/raw/4c6b9019a9e99ce0d112c6287b827fa9c7795126/map.geojson]{popup-text}[/leaflet-geojson]

    Only leaflet-marker have the parameter svg. But you can use icons, these may be svg icons:

    [leaflet-geojson src=https://gist.githubusercontent.com/dalf22/65ae4cb48054b60ad3a320cfca63047e/raw/4c6b9019a9e99ce0d112c6287b827fa9c7795126/map.geojson iconUrl="..." iconAnchor="..,.." iconSize="..,.." popupAnchor="..,.."]]{popup-text}[[/leaflet-geojson]

    Thread Starter dalf22

    (@dalf22)

    Thanks! But the shortcode just add a red marker. I need the markers in the locations that I’m importing from Geojson have a different color when showed. All of them.

    Plugin Author bozdoz

    (@bozdoz)

    I believe what you are looking for is not currently implemented: https://github.com/bozdoz/wp-plugin-leaflet-map/issues/44

    Thread Starter dalf22

    (@dalf22)

    @hupe13 I tried the icons, and it worked really well! Thanks.

    @bozdoz thanks as well. PS. You know in the “Shortcode helper” part of the plugins most of the examples are not showing? It made it hard for me to understand the plugin because i couldn’t see what every shortcode does.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘marker-color when import geojson’ is closed to new replies.