Leafy Maps šŸŒæ (new free plugin)

You should do a Youtube channel with all settings. Videos from the beginning installing the APIs until the most difficult set up. This will reduce the questions here. ItĀ“s just a suggestion.

1 Like

IĀ“m trying to set the Markers list as the profile pictures of the users. But in Dynamic image doesnĀ“t give me this option. Do I need to set this data source in anywhere?


is there any way to remove the branding?
Screen Shot 2022-07-29 at 11.09.51 am

Technically yes, trivial even, but it would go against these providerā€™s licenses. They demand that for you to use their things.
But you can look into their demands with more details, maybe they provide exceptions or conditions. Search the web for their names and you will find more in their official websites.

Fala Thiago, blz? Sabe como posso consertar o problema que publiquei ali em cima?
NĆ£o estou conseguindo puxar a foto do perfil do usuĆ”rio como um Marker.

Soā€¦ seems to work on right button (as in not the normal button) click.

Okay - because this stream is a bit braindeadā€¦

The functions related to map button clicks work on the secondary button - not the primary.

Which zone is the point contained in.

This appears to use the top layer if there are overlapping layers of polygons. @vini_brito perhaps this could return a list of zones the current point is contained inā€¦

Has anyone got ā€œremove elementā€ to work on a polygon list?

Hi Andrew! @andrew.waites
The formula for them is this: polygon_class_name{i}
So if you give them a class name ā€œbuildingsā€, they would be called buildings0, buildings1ā€¦

Try that and let me know if it works!
P.S: Use a loop to target them all dynamically.

Also, I am unsure about this one, but try using the ā€œerase list of markersā€ but pass the polygon class nameā€¦ it will leave behind one polygon, the first one called buildings0, so this one you can remove with a single ā€œremoveā€ action.

Vini

My polygon name (I presume that is the class name) is a number 12345678 - I tried removing 123456780 but there is no error and nothing happens on the map. I tried adding an x to the end to make it 12345678x and the remove call then referenced 12345678x0 but still no error or change.

I am using load polygon list here because it could be a list of polygons but it normally is a single element list - also the single polygon load requires a list of lat/longs and I have stored the coords in the JSON snippet form.

Given these are nearly all single element lists and the remove list of markers leaves item0 behind it probably wonā€™t help much. (I might try it anyway for reference)

So, any further ideas? I am presuming that the remove element should remove it from the displayed map.

thanks

I have investigated the DOM model and a polygon ā€˜appearsā€™ to be displayed by the following code:

<path class="leaflet-interactive" stroke="rgba(77, 3, 62, 1)" stroke-opacity="1" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" fill="rgba(158, 41, 41, 1)" fill-opacity="0.2" fill-rule="evenodd" d="M382 300L380 282L383 270L382 268L386 266L390 269L394 276L393 294L399 303L404 307L409 317L409 323L417 329L417 333L410 343L398 367L374 364L362 361L361 358L369 352L376 339L381 318L382 301z"></path>

There is no sign of an identifier here with which to delete this polygon. Then again there is no sign of a zone name and they are passed in so perhaps it is somewhere else in the DOM.

Okay,

Vini - I pulled the code apart. You were almost right. The name of the element is buildings_0 not buildings0

rgds

1 Like

Hi @vini_brito ā€“ itā€™s amazing how you continue to expand Leafyā€™s capabilities. I want to upgrade to the latest version, but I wonder:

Do these new features (e.g. Mapbox tiles) materially increase the size of the plugin, slowing down my userā€™s experience? In other words, if I donā€™t need a new Leafy feature, should I NOT upgrade, in order to minimize the plugin size?

Or does it not matter, because the added features are only a small amount of added code? Are external libraries (e.g. Mapbox tiles) only loaded when they get used in an action?

I know youā€™re also fixing bugs, so even if I donā€™t need a new feature, I would want to upgrade.

Thanks again for maintaining and expanding this great plugin (with the help of your supporters :slight_smile: of course)

1 Like

@greg18

Hi Greg! Nice question. The pluginā€™s weight has not increased for quite some time now, even if you use these new features.
I mean, technically, yes, it has increased, but very little, it would be the same as adding a grain of sand on top of a house.

But even when the size increased back then, it wasnā€™t by much, I always go for the most efficient route on everything and also for the most backwards compatible path to avoid breaking changes.

2 Likes

Vini

How hard would it be to add a show/hide option on polygons (and markers) instead of remove/add?

thanks

@andrew.waites Hmm, what would be the difference? Because you can remove and re-add with the same data and it would have the same practical effect as a show/hide mechanism.

Of course if something else is happening different to this, then let me know! Or if you have something else in mind as well, feel free to share :blush:

Is there a way to adjust the size of a custom icon? This would really save me from playing around in preview to get my icons the right size for my screen.

thanks so much :slight_smile: for all your work so far

Any idea why this is happening when I load the map?

The ā€œcentreā€ of the map (in the workflow) is in the top left corner, and if I scroll left and up I can see more of the map loaded - but I always get this unloaded grey area. If I zoom in or move around the map some new areas load but other areas also go grey.

Weirdly, on mobile it seems to work OK and I get way less grey area.

Screenshot from 2022-09-02 15-59-30

edit: As always happens, posting this lead me to what has solved the problem. I was loading the map while it was hidden, resulting in this. By changing the workflow to only do it when it became visible, it started loading properly.

1 Like

Is there an event that is fired when ā€œCheck if point is located in polygon area (geofenceā€¦)ā€ completes? I tried the ā€œLocation found eventā€ but that does not seem to fire. I established that client-side actions canā€™t return a result (thanks bubble) and pause does not seem to be firing but perhaps I can push some dummy data to the screen to encourage that (very kludgy solution).

This is currently killing me as I can find no way to get my workflow to wait for this information so it is always acting on the previous point clicked not the one that fired the workflow.

Iā€™ve tried every combination of custom flows etc that I can think of ā€¦ so my workflow is now very confused.

Okay - I found the ā€œwaitā€ plugin. If I do the locate in a workflow that just does that call (Check if pointā€¦" and then calls the wait for 200 ms then the ā€œon wait completionā€ wf does the rest - it works a charm.

FYI