Templates Plugins Courses

Bug Report - Map Box Error

Hi there,

For my app: https://route-manager.bubbleapps.io/ I receive the following error when I attempt to add an item to my itinerary.

The plugin MapBox Maps / action Add List of Markers a MapBox Map threw the following error: TypeError: Cannot read property ‘loadImage’ of undefined
at eval (PLUGIN_MapBox-Maps-element_action–MapBox-Map-Add-List-of-Markers-.js:3:357)
at Array.forEach () (please report this to the plugin author)

Hi @harrisonalley, unfortunately the plugin is not reproducing errors on our side. We have also tested your app and it seems to be working, except for some of the locations that throw error. The reason of this error specifically is the following:

However, after test it displays some of the locations on the map, which is a good sign. So, I assume that the data it is trying to retrieve from database for locations that throw this error can be corrupted or just missing. To try and solve this, please check for this icon and the locations data to be set up correctly. If it still doesn’t work, you can add our [email protected] account to your collaborators list within your app. Go to Settings -> Collaboration tab to add. In this case we’ll check it and get back to you asap.

Note: avoid the warning message regarding the plan, as we are an agency and you can easily add our account to your collaborators list.

Best,
Alex

1 Like

Thanks for the response.

I have added [email protected] as a collaborator.

When I visit my app in an incognito tab and try to add markers to the map, it shows this error no matter which locations I try to add to the itinerary and map. I have also added a custom icon like you mentioned above.

Are you saying you don’t get an error when you add locations?

Hi @harrisonalley, unfortunately this error is not reproducing on our side. The error regarding ‘loadImage’ is not reproducing after test, so I assume it has been fixed. We have tested your app, and even if it is still throwing a different error, it is still working because the markers are displayed on the map:

And this is the error occurring only when pressing a map a location the first time:

However, the markers are displayed properly without any error on our side, unfortunately. The reason for these errors could be a development issue regarding implementation of this plugin. The way you could try to solve this, is by making things easier.
So, in case you want to search for and display only a single marker on map, it is better to accomplish it with Add Marker MapBoxMap action rather than Add List of Markers MapBoxMap.
Here is a screenshot of our test demo app to showcase:

So when the user checks the Map it! checkbox of your app, it will perform a single Add Marker action where you do a search for the specific location based on Lat and Long of the current cell’s element.

But for Select All/None can be used the multiple display action, as it will anyway search through all items in the database that belong to certain category.

Before making changes to your app itself, you can place separate elements for testing purposes and check for each scenario whether plugin still throws errors or not. In this case, just place a checkbox element and set an event to search for a single marker based on Lat and Long, then another one for searching and displaying multiple markers. Also, you can leave the Preset status as Unchecked.

Hope it helps!

Ok thanks. That’s really strange it’s not reproducing on your end. I don’t see any map markers when I try to add any location to the map. But I’ll keep working on it and write back here if I run into a new problem.

1 Like