Hi @luke1, thanks for your reply.
Please be sure to check all markers to have the proper images uploaded. The shown error might be related to the impossibility to load the missing marker image.
Regards,
Hi @luke1, thanks for your reply.
Please be sure to check all markers to have the proper images uploaded. The shown error might be related to the impossibility to load the missing marker image.
Regards,
Thank you @Serg - we’re getting closer!
You were right, some of the markers were still in SVG and so they weren’t showing up. I have now changed them all to png and more of them are showing up.
However, I am still missing one marker on the map. I should have 7 markers but only 6 are showing up. I have tried running the page in debug mode and I can see that the “List of Icons” is being populated with all the 7 markers (refer to the image below), however, one of them is not displaying on the map.
I also checked the “Markers Source” property and it is also being populated with 7 map objects, so the number of markers/icons are the same in both “Markers Source” and “List of Icons”.
What I have noticed is that it is the first marker that is not being displayed on the map.
Console shows only this error but not sure if it’s relevant here?
Thanks!
Hi @luke1, thanks for your reply.
Please check that all 7 markers have the proper image for display. Following the inspector hint, seems that one of them is not uploaded correctly.
Regards,
@Serg I didn’t realise I had 2 markers with the exact same location - issue is now solved - thank you so much!
Hi @luke1, glad to hear that mentioned issues have been solved
If any other questions will arise, you know where to find us
Have a good week ahead!
Regards,
@Serg sorry to bother you again. I am now trying to add some more complex functionality on top of this by setting a different coloured marker for “selected” points on the map.
In the debugger I can see that we are getting the list of 7 PNGs correctly (see image below).
However, in the browser console I am getting the following error - “Error: An image with this name already exists.”:
Bubble gives me no errors, but what shows up on the map is 7 red markers (when it should return 4 red ones and 3 green ones)
The 7 pngs can be accessed here:
Any ideas of what could be happening here?
In case you need to access the Bubble workflow that is causing this, you can head to the “Group ItineraryStop is clicked” workflow in the “trip_plan_new” page. Support account should still have access to the app.
Hi @luke1, thanks for your message.
Allow me to recommend creating a test page, with a simple “Add list of markers” function, which you can complicate step by step to the existing one. It will allow you to identify the stage when the above-mentioned error will appear.
Hope the provided hint will help.
Regards,
Thank you, Serg. Can you just clarify what you mean by “or the sorting options setup is incorrect”?
I’ve ruled out format issues because when I use all red or all green markers they all load up correctly without any issues. The issue arises when I try to merge the two type of markers together into one list.
Let me explain in more detail.
What is not working
Basically my markers source is now a merge of two lists, instead of just a single list:
And my list of icons is also a merge of two lists’ list of icons (Default_Icon is the red icon, Selected_Icon is the green icon).
What is working
Both of these options work well (which is why I do not think that the format is the issue here):
And if you’re wondering whether the searches are returning the same list, I have posted the screenshots in my previous post showing that Bubble is indeed compiling the right lists for both the source and the list of icons, and they are also in the correct format.
Hi @luke1, thanks for your reply and provided additional details.
Regretfully, the Mapbox plugin doesn’t support the load of two merged markers lists or a load of some markers from one list and some from another.
A possible workaround would be to use the conditions, for example, the list of markers loaded by default under certain conditions can be replaced by another list.
As the shown error didn’t provide enough details, that was a supposition on what moment should be paid additional attention to.
Please let me know if there is anything else that I can help with about our plugin.
Regards,
Ok thank you, Serg!
Few last questions so that I can look at what is the best way how I can work around this:
Ultimately what I want to achieve is that when a user clicks on a section on the page, the points on the map relating to that section are highlighted to the user (in this case I am using different). Is there another easier way of doing this with the plugin?
And on another note, if I load all images in a custom state list (originally merged from two sources), then would I be able to load the markers on the mapbox map as a single list from the custom state list?
Thanks!
Luke
Hi @luke1, thanks for your message.
Besides the workaround proposed above, the only thing that I can add is that you also can use the “Fly to a Mapbox Map” action, so the certain point on map with related markers will be shown closer to the user.
Even if it is one merged custom state, it is still using two sources and,regretfully, will not display all markers properly.
Hope the provided answers helped in a way. If there will be any other questions, please let me know.
Regards,
@Serg I cannot find the action to change the list of actions in the conditions. Can you please point me towards where you suggested?
Another workaround
I have tried another workaround - I keep a list of the icons that need to show in the DB, so that when I need to refresh the markers I just get a single list of icons from the DB.
The problem is that the icons do not change from red to green. It seems like the mapbox plugin cannot refresh the markers without having to reload the page?!
If I load the “Green markers” on page load, and then on user click I change them to “Red markers”, they will not change to red - they remain green.Vice versa, if I load the “Red markers” on page load, then on user click I change them to “Green markers”, they will not change to green - they remain red.
This is the error that I see in the console:
I am also using the “Remove all markers” function before I call “Add list of Markers”.
Is it possible to update the plugin so that at least it can refresh the markers when add list of markers is called? (or maybe even when remove all markers is called?)
Thank you.
Hi @luke1, thanks for your reply.
Apologies for a bit unclear reply from my side. The abovementioned conditions should be used within the “Add list of markers” action, having the corresponding action with a list of markers for each case.
As possible solution - you can have two separate data types & lists, marker1 and marker2 for example, which can be loaded/ removed/uploaded in accordance with your case setup.
Maybe I am missing something, but so far, plugin features allows to add /remove/replace one list of markers with another.
Please let me know if still there is something that requires additional help from my side .
Regards,
ok so in this case this is not a viable solution because I need to change the list of markers on a user action (i.e. when page is already loaded).
^ I do not think that the plugin is working then. Here is what I am seeing:
On page load, I am loading 6 green icons on the map. They are correctly shown:
When a user clicks on a particular button on the screen, I clear the markers, I select a subset of those markers (3 of the 6) and show these 3 markers in red (from another, completely different, DB field).
But what happens is: the markers are cleared , the subset of the markers (showing 3 out of the original 6) are shown
, but the map keeps the icons from the DB field used in the Page Load event
. So I end up with 3 out of the 6 points selected but showing in the same original colour.
It looks like the plugin is not trying to re-load the new images but instead re-using the same list of icons defined on page load.
Hi @luke1, thanks for the provided details.
I’ve passed this case to the developer team investigation, and once any results will become available, I will let you know.
Thank you for your patience and understanding
Regards,
Hi @luke,
Apologies for no news so far, the investigation is still ongoing. Once any result will become available, I will let you know asap .
Regards,
Hi @luke1, thanks for your patience.
In your case, to upload different types subsets of markers, please use different marker cluster ID for each action. Your issue appeared due to the fact that markers have the same name + same cluster id.
For each “Add list of markers” action you choose a unique Marker Cluster ID and it should not be the same in each add list action.
Hope the provided hint helps. Please let me know if there is anything else that I can help with about our plugin.
Regards,
Hey @Serg - it’s been a while but I just wanted to loop back in to confirm that this was indeed the solution to my problem.
Thank you!