• Resolved Wizard

    (@badmp3)


    So I have a new problem, i created many markers but they are all inlined, and not using geojson file..

    I am trying to figure out how to use this:

    Here is my basic markers.json




    {
    "type": "FeatureCollection",
    "features": [
    {
    "type": "Feature",
    "geometry": {
    "type": "Point",
    "coordinates": [40.979898069620155, -76.640625]
    },
    "properties": {
    "names": "Zimmsville",
    "descriptions": "Recommended Level 2",
    "url": "/icons/union.png",
    "size": [30, 30]
    }
    },
    {
    "type": "Feature",
    "geometry": {
    "type": "Point",
    "coordinates": [56.36525013685609, 28.828125000000004]
    },
    "properties": {
    "names": "Super Market",
    "descriptions": "Recommended Level 15",
    "url": "/icons/union.png",
    "size": [30, 30]
    }
    }
    ]
    }

    Here is the shortcode:

    [leaflet-geojson src=”/markers.json”

    iconurl=”{url}”

    iconsize=”{size}”

    iconanchor=”15,30″

    popupanchor=”0,-30″

    tooltipanchor=”0,-15″]

    {names} – {descriptions}[/leaflet-geojson]

    This isnt showing the icons, it does show names and description

    It seems the {url} is not pulling the data from the json, while the name / description works..


    Can someone help make a basic example to get this working? I can then start to convert the others.


    Another tidbit – So Just to try it out, I put {url} at {names} – {descriptions} – {url] [/leaflet-geojson]

    and it shows the URL in the hover / tooltip , but for some reason, its not putting it in the other spot where it needs to go???

    • This topic was modified 3 months, 3 weeks ago by Wizard.
    • This topic was modified 3 months, 3 weeks ago by Wizard.
Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author hupe13

    (@hupe13)

    Unfortunately there is not such a possibility. leaflet-geojson has only these options. All markers have the same icon.

    Maybe you can group the markers. Then every group has its own icon.

    Thread Starter Wizard

    (@badmp3)

    Wait, so your saying that
    iconurl=”{url}”
    iconsize=”{size}”

    Can not take the data from the json and you gotta manually add it in?

    Plugin Author hupe13

    (@hupe13)

    I’m sorry. I asked @bozdoz.

    Thread Starter Wizard

    (@badmp3)

    Interesting, so here is a new problem then

    I am trying to convert 1000’s of markers that were basically this:

    [leaflet-marker lat=-24.647017162630352 lng=136.14257812500003 iconurl="/icons/union.png" iconsize="30,30"]HP Evolution Institute[/leaflet-marker]

    [leaflet-marker lat=-22.647017162630352 lng=132.14257812500003 iconurl="/icons/monolith.png" iconsize="30,30"]Monolith[/leaflet-marker]


    etc

    into this

    [leaflet-geojson src="/union.json" iconUrl="/icons/union.png" iconSize="30,30" iconAnchor="15,30" popupAnchor="0,-30" tooltipAnchor="0,-15"]{name} {description}[/leaflet-geojson]

    [leaflet-geojson src="/monolith.json" iconUrl="/icons/monolith.png" iconSize="30,30" iconAnchor="15,30" popupAnchor="0,-30" tooltipAnchor="0,-15"]{name} {description}[/leaflet-geojson]


    etc

    Since I can’t put everything into one json, due to many markers having different icons, I am making separate jsons for each group.

    The new issue is the grouping, so the side Menu shows all of the previous grouping, but its not under the Parent / Tree anymore.

    For example, the Old Union and Monolith buttons on the side menu still work correctly and are turning on / off the markers from the json update. But all the ParentGroup that I had created all stopped working, there is some conflict / bug with mixing geojson / leaflet markers together it seems.


    [parentgroup parent="Legend" childs="Union,Monolith,Lea,Silos,House,Teleporter,Settlements,Hint,Elite,Accessory,Recipe"]



    I am going to have a mix of the old format “leaflet-marker” and “leaflet-geojson”

    Do you have any thoughts on how I can get around this? So I can have some leaflet-geojson and leaflet-markers under the same Parent Tree…

    • This reply was modified 3 months, 3 weeks ago by Wizard.
    • This reply was modified 3 months, 3 weeks ago by Wizard.
    • This reply was modified 3 months, 3 weeks ago by Wizard.
    Plugin Author hupe13

    (@hupe13)

    Since I can’t put everything into one json, due to many markers having different icons, I am making separate jsons for each group.

    I would have suggested the same.

    I am going to have a mix of the old format “leaflet-marker” and “leaflet-geojson”

    Do you have any thoughts on how I can get around this? So I can have some leaflet-geojson and leaflet-markers under the same Parent Tree…

    You can define many leaflet-optiongroup and / or leaflet-featuregroup as you like. leaflet-parentgroup should the last shortcode after them. You can have more as one leaflet-parentgroup too. leaflet-parentgroup only handles the groups, the elements within them are irrelevant.

    Or what do you mean?

    Thread Starter Wizard

    (@badmp3)

    So this is how the menu works with the Trees, when I am not using Any Leaflet-geojson, its all Leaflet-markers
    https://i.imgur.com/6hohrEf.jpeg

    When I start to remove leaflet-markers, and convert it to leaflet-geojson, the menu Parent Tree Breaks

    it looks like this

    https://i.imgur.com/wBnwJZi.jpeg


    I didnt change any of the parentgroup, or the leaflet option data, I am missing something here that I need to do in order to make the leaflet-geojson to work in the parentgroup

    Or there is a bug

    The Markers Still turn Off and On when I click on them so the leaflet-optiongroup still seems to pick up the new leaflet-geojson changes I put in… but the parentgroup doesnt seem to register it.

    Plugin Author hupe13

    (@hupe13)

    Are the geojson markers and leaflet-markers sorted correctly in the groups? Wich shortcodes you are using to group markers from geojson and leaflet-marker? leaflet-optiongroup and/or leaflet-featuregroup?

    childs in leaflet-parentgroup are the same as in groups from leaflet-optiongroup or leaflet-featuregroup. Maybe the html tags are not handled correctly.

    Thread Starter Wizard

    (@badmp3)

    Using this

    [leaflet-optiongroup disableClusteringAtZoom=0 option=”iconUrl” values=”union, monolith, lea, silos, house, teleporter, settlement, gearbox, weaponsbox, mysterybox, hints, elite, wpacc, recipe, meme, crate,startrace-

    Then this

    [parentgroup parent=”Legend” childs=”Union,Monolith,Lea,Silos,House,Teleporter,Settlements,Hint,Elite,Accessory,Recipe”][parentgroup parent=”Treasures” childs=”Gear Crate,Weapon Crate,Mystical Chest,Hidden,Morphic Hunt,Seed Store”]

    Plugin Author hupe13

    (@hupe13)

    How are the groups from leaflet-optiongroup?

    Thread Starter Wizard

    (@badmp3)

    groups='<img src=/icons/union.png height=20 width=20>Union,<img src=/icons/monolith.png height=20 width=20>Monolith,<img src=/icons/lea.png height=20 width=20>Lea,<img src=/icons/silos.png height=20 width=20>Silos, *More stuff* ' substr]

    • This reply was modified 3 months, 3 weeks ago by Wizard.
    • This reply was modified 3 months, 3 weeks ago by Wizard.
    Plugin Author hupe13

    (@hupe13)

    I tested it, I can’t detect any errors.

    Are you using the latest version of the plugin 3.4.1?

    Thread Starter Wizard

    (@badmp3)

    Just upgraded, seeing another problem now, the Collapse Menu Parent thing

    It has a symbol that isnt showing? Do I need to download a icon for it to show up?

    View post on imgur.com

    Plugin Author hupe13

    (@hupe13)

    Are you using Elementor? If yes, this is a bug. There is a Gihub version, there it is fixed and parentgroup has more configurable options.

    Thread Starter Wizard

    (@badmp3)

    If elementor is a theme, we dont used that.. have a news type of theme

    Plugin Author hupe13

    (@hupe13)

    Do you have any Awesome fonts installed? If yes, please test the Github version. If not, I don’t have an idea, because I don’t know your theme and plugins.

Viewing 15 replies - 1 through 15 (of 22 total)
  • You must be logged in to reply to this topic.