Leafy Maps šŸŒæ (new free plugin)

Thank you for your quick response. I will try to find out what is blocking.

Sorry @vini_brito but what do you mean by ā€œthe provided nameā€.

I only have one map per page. When I move from one url/page to another, I remove the map and add a new one. Is this a mistake?

In any case, when I remove a map, I donā€™t see where to provide a name. Am I missing something? Here is an example:

Isnā€™t it trying to remove a map that was not initialized still?
Also, I recommend not using that ā€œremoveā€ feature, it is just confusing and something I thought would be useful when I first created the plugin, but ended up not being useful at all.

You should just show and hide the map element, thatā€™s the best way.

1 Like

I will follow your advice and see if it solve the problem!
Thanks for your help :slight_smile:

Edit : @vini_brito, after a few tries, here is what it looks like : when using a single page app, the possibility to use ā€œremove mapā€ then ā€œshow mapā€ when switching from one url to another is very useful. Without it, as soon as I change the url the map disappears.

1 Like

Hello,
I do apologise for this very basic question, and I am quite new on the API topic.
i have installed the leafy plugin, and i want to try to use openstreetmap as a map provider. I am trying to get the APIs . however I have only 2 api keys provided by openstreetmap, once i register the applica tion through oAuth.
If Id like to use the plugin for openstreetmap, can anybody guide me on how get connected with openstreetmap APIs? Or is out there a guide how to explain it?
Thank you very much @vini_brito

You wonā€™t be able to do that. Use one of the existing providers in the plugin, there are several nowadays :yum:
And they have generous free tiers.

Thank you very much for your reply! Last question, are all those providers have the same method, where u need to provide a credit card and then they will charge above a certain amount of api requests? Like Google basically?
Thanks

Indeed, each time you use an API from a service (Stadiamaps / Mapbox / HERE ā€¦), you will be charged for each API requests.

Thanks for your reply. What I meant is if there was a provider that would give you a free amount of requests ie 100 requests and then if u exceed, the app wont work untill you pay for more. Rather than setting up a limiter of requests with potentially be charged if u dont pay too much attention or if you havent set up the limite correctly. Ie like Google. Just cos i was concerned as I am not a professional but rather an amateur :sweat_smile:

I think Stadia actually might work for me? As It doesnt pre- require a credit card?

1 Like

Yes, indeed, we spoke with one of the developers of Stadia Maps and he explained that once the limit is reached, we do not pay more than what is planned. You can request to have more API requests if needed.

1 Like

Thank you, actually even MapTiler does work the same,

Hi @vini_brito,

I just looked at my Mapbox usage statistics and was surprised to see that only the ā€œStatic Tiles APIā€ was used.

I use the ā€œGet map center a Leafy mapā€ action to get the GPS coordinates of the map center. So I expected to see a use of the ā€œTemporary Geocoding APIā€. But there is nothing.

If the GPS coordinates donā€™t come from Mapbox, where do they come from?

It is attained locally, from the engine used by the plugin that is running in the page.
The engine has a coordinates map, so it knows the coordinate of everything inside it, map center which is the middle of the current view of the user, where the user clicked and anything else that exists locally.

Geocoding is a service that, exclusively, translates an address name to a coordinate.

So if you have ā€œStreet X, City Yā€, the map engine functioning in your page does not know where this is, it doesnā€™t contain a database of places and their respective coordinates.
This external service does have, so it can be used to grab the coordinates of an address and once you have that coordinate you can give it to the engine and tell it to place a marker there or to zoom there.

1 Like

Thank you for these explanations.

@vini_brito Does this mean I can store the GPS coordinates, share them with others and have a commercial use?

I want to update the map markers and polylines when the contents of the repeating group is updated. Iā€™ve made a custom event for this, which includes the following actions:

I canā€™t get the ā€˜remove elementā€™ actions to work. Iā€™m using the correct element names I believe:

Added element:
image

Remove element:
image

What am I doing wrong? And is a custom event for updating the map overlays the best way?

Thanks!

Hi folkz! Does anyone know if the mapbox or stadia api actually optimises the route, or just add the coordinates in the respective line as you add them to the workflow long - lat list?

Any way to get the route in order like in google maps? Destinatin A, destination B and so onā€¦ Answers are muchappreciated :slight_smile:

Like which point should I start with, second, third? :slight_smile:

Hi @vini_brito

When I add a list of markers I give it a unique name. Is this list of markers exposed somewhere in a state?

Iā€™m trying to customize the popup that shows up when I click on a marker.

When I click on it, I can get its index and id.

I guess there is a way to use the index and id to access, via the marker list, the data about the object corresponding to the marker I click on.

How do I get access to it?

Maybe Iā€™m just doing it in the wrong way :confused:

image
image

Greetings! I have a problem when using Fly, then an error comes out in the browser
@vini_brito