Mapbox, Please Help!

i did a heatmap… still waiting to have the method exposed
we need to be able to define the onclick event. for layerType and layerId

there’s only a click event for the map in general and for markers, not clusters.

it’s slightly different for cluster maps.

the fastest/easiest thing to do would be to make a map available as a global instance such that we can add our own event listeners

the fastest/easiest thing to do would be to make a map available as a global instance such that we can add our own event listeners

Yes, sorry I tried but our explorer doesn’t handle very well huge instance object like the mapbox instance so I was unable to make it available in workflow or as a component variable for now, but still exploring the idea :slight_smile:

2 Likes

Hi @jaredgibb,

I’m happy to announce you we released a new version for our mapbox plugin and element.

You can now access the map instance as a component variable.

You can also access the mapboxgl library with code wwLib.wwPlugins.mapbox.mapboxgl

And we added three more triggers to help you implement your workflows.

3 Likes

This is sick! When I have time to return to this product in a couple weeks I’ll be sure to add a demo of this features usage for us!!

2 Likes

@Alexis i am trying to locate these triggers and mapbox as variable, but i cannot see it in my instance even though im using the mapbox. have these features been removed?

EDIT: i’m also noticing that wwLib.wwPlugins.mapbox… is no longer found, instead it appears google likely replaced it?

thanks in advance for your help!

Did you refresh after installing mapbox ? It should still be there, it is for me :thinking:

Capture d’écran 2024-05-13 à 11.08.04

hmm, @Alexis please see the below image.

wwLib.wwPlugins.mapbox results in undefined.

Could you click on “plugins” on your topbar, can you see mapbox installed ? (I imagine there is a way to have the mapbox element without the mapbox plugin)

1 Like

@Alexis you’re the best. you nailed it. sorry for the confusion on my end. it was not added, yet the elements were. once i added and refreshed, i now see :slight_smile:

one more question @Alexis when i click on the element and then add a workflow, the # of options appears less than what you’ve shown above. am i looking in the wrong place, or missing something else?

EDIT: ah, i see… since i likely added the element before the plugin, they aren’t showing on the original. but when i re-add the element, i now see them. order of events matters! might be useful to prevent user from adding the element without first installing the plugin. in any event, i seem to be all set now. thanks again

image

Curious, how did you add the mapbox element before installing the plugin ?

Are you sure it was a mapbox element and not a google map element ? :thinking:
Because having the plugin installed should not change the number of events available, the only possible way is it was not a mapbox element in the first place, or it was an old forked mapbox element :thinking:

Interesting, @Alexis … let me see if I can reproduce. Most likely it will be easiest to consider it my user error :laughing:

Well, you don’t need to search more, from your screenshot we can see the google logo bottom left on the map haha

But the element was named mapbox for whatever reason so I didn’t checked more

1 Like

Is everything explained above be applicable to google maps?

I would need to have the coordinates updated when the user moves the map, is it possible?

Best,

I don’t think we have this feature right now on the google map element :confused:

You can make a feature request on feedback.weweb.io :slight_smile:

1 Like

thank you

@Alexis Hi. Sorry if it’s not related to this thread but I’m quite desperate. I can’t find google maps instance unlike mapbox. I also checked wwLib.wwPlugins and it’s not there. Where can I find it? I’m using google maps weweb component. Thank you.

Hi, I don’t think we implemented it yet, what are you trying to achieve ?

To add event listeners like zoomend and dragend, I switched to Mapbox to achieve this.

I’m using the weweb’s mapbox extension/plugin. It’s using public key and not secret key. is this safe for production?