• Resolved Wizard

    (@badmp3)


    So I have a bunch of number markers
    [leaflet-extramarker lat=-2.108898659243126 lng=-86.12040479526678 markerColor=purple shape=circle icon=fa-number number=1]

    This is what I use for the optiongroup
    [leaflet-optiongroup option=”number” values=”1,2,3,4,5,6,7,8,9″ groups=”1,2,3,4,5,6,7,8,9″ cluster radius=90 disableClusteringAtZoom=0]

    This works to show on the map numbers 1-9, and you can toggle it off and on each number

    But we dont know how to do it with Icons?

    Here is a example of the Icons we use

    [leaflet-marker lat=-1.7136116598836224 lng=98.43822701394923 iconurl=”/icons/Folgorite.png” iconsize=”20,20″]Folgorite Crystals[/leaflet-marker]
    [leaflet-marker lat=46.76996843356982 lng=-45.664486889329254 iconurl=”/icons/Azurite.png” iconsize=”20,20″]Azurite Crystals[/leaflet-marker]

    Can anyone help point me in the right direction? I assume this shouldnt be that hard, just we dont know the correct syntax / method of doing it.


    Additionally, any way to add Text to the Filters / Toggle On / Off side screen thing?

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

    (@hupe13)

    leaflet-marker does not have many properties for grouping. There are iconClass, title, iconUrl, see the documentation and examples.

    Additionally, any way to add Text to the Filters / Toggle On / Off side screen thing?

    What do you mean? You can write some text in groups option:

    [leaflet-optiongroup option="number" values="1,2,3,4,5,6,7,8,9" groups="text 1,text 2,text 3,text 4,text 5,text 6,text 7,text 8,text 9"]

    to get some more text in the control field. Or do you mean a control field outside the map? I have seen this on some pages, but I don’t know, how to make this. An example for listing markers is here.

    • This reply was modified 1 year, 3 months ago by hupe13.
    • This reply was modified 1 year, 3 months ago by hupe13.
    Thread Starter Wizard

    (@badmp3)

    Thanks, with your example I was able to configure the Icons to be able to turn on and off..

    What I mean by additional text is, when you make the optiongroup, it shows the Values and then Text next to it…

    Is it possible to put Text Before it starts the Listing of the Options?

    Like here is a hack way to do it, but there must be a more clean way to do it
    ——–
    [leaflet-optiongroup title=”Legend” option=”number” values=”1,2,3,4,5,6,7,8,9,10″ groups=”1,2,3,4,5,6,7,8,9,10<br>Resource
    ” cluster radius=90 disableClusteringAtZoom=0]
    [leaflet-optiongroup disableClusteringAtZoom=0 option=”iconUrl” values=”Redwood,Deadwood” groups=”Redwood, Deadwood” substr]
    ———–
    Doing this will show the list of 1-10 options then have some text called Resource then show the next group.

    Plugin Author hupe13

    (@hupe13)

    Unfortunately, this is not possible. And note: a marker can only belong to one group.

    It may be better if you write the markers with their properties in a geojson file. Then you can do a little more because you can assign more properties to the marker. But you can only ever group in such a way that one marker belongs to exactly one group.

    Thread Starter Wizard

    (@badmp3)

    Any chance you can add to the Short Code a Option for leaflet-optiongroup to have at the top of the grouping

    SHOW ALL / HIDE ALL

    And maybe also a way to Open/Collapse the Popup Window with the markers / filters etc

    Plugin Author hupe13

    (@hupe13)

    Any chance you can add to the Short Code a Option for leaflet-optiongroup to have at the top of the grouping

    SHOW ALL / HIDE ALL

    There is a option visible for leaflet-optiongroup:

    visible (optional) – initial visibility of a group, default: 1. Either 0 (valid for all groups) or a comma-separated list of 0 and 1, where the number must match those of groups.

    And maybe also a way to Open/Collapse the Popup Window with the markers / filters etc

    I put it on the wish list.

    Thread Starter Wizard

    (@badmp3)

    We know about this, we are looking for a easy way to add a Button that is Show All / Hide All Markers

    Here is a example https://moe-map.com/
    You see this, this is a Leaflet powered map

    It has a button to Enable or Disable everything

    It also has a way to add some Text between the markers for that pop up window

    this would be super useful to have in the shortcode similar functionality

    Plugin Author hupe13

    (@hupe13)

    The shortcodes leaflet-optionsgroups and leaflet-featuregroup are realized with the Leaflet plugin Leaflet.FeatureGroup.SubGroup. The mentioned website hat an own implementation. The Leaflet plugin can’t do this. Sorry.

    Plugin Author hupe13

    (@hupe13)

    And maybe also a way to Open/Collapse the Popup Window with the markers / filters etc

    You can test the Github version. Documentation is, when installed, under https://your.domain.tld/wp-admin/admin.php?page=extensions-leaflet-map-github&tab=featuregroup

    • This reply was modified 1 year, 3 months ago by hupe13.
    Plugin Author hupe13

    (@hupe13)

    Now it is possible to open or collapse every control and put it on every corner of the map.

    I set the thread as resolved.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Marker Filters On/Off for Icons?’ is closed to new replies.