📍 New Plugin: Beautiful Maps - Mapbox

(more) May-24 updates
Just released a new version of the plugin (version 1.11.0).

  • The Map element now has a new exposed state called ‘Last Clicked Marker Unique ID’
  • The ‘Add List of Markers’ action has a new (optional) field called ‘Unique IDs’ (list)

This basically lets you link each marker on your map to the unique ID of the associated location in your database.

The use case for this is if you’re using the ‘When Mapbox Marker is Clicked’ event, you can now trigger a workflow action that changes (or uses) the location associated with the marker you clicked.

Previously, this could be achieved by using the ‘Last Clicked Lng’ and ‘Last Clicked Lat’ exposed states to look up the relevant location in your database.

But that wouldn’t always work if you’re using the offset field to separate out markers that have the same address.

Using the ‘Last Clicked Marker Unique ID’ means that is not longer an issue.

Any questions let me know :slight_smile:

1 Like

(more) May-24 updates

Released a new version of the plugin (version 1.12.0)! A new exposed state has been added to the Mapbox Map element called ‘All Markers Loaded’.

This is a ‘yes/no’ field that changes to ‘yes’ once all markers have been loaded using the ‘Add List of Markers to Mapbox Map’ action.

This can be useful if you’re loading a large amount of markers and want to show a loading screen while they’re loading.

2024-05-2909.32.11-ezgif.com-optimize

1 Like

Hey Alex - how about a feature that changes the selected marker icon? Right now, I’m hacking it by overlaying a new marker based on a set of conditions, but as soon as I select another marker, the previous marker still shows.

Hey @zico.gaeffke - nice idea.

I’ve a pretty busy product roadmap for the next while, but I’ll add this to the list of features to investigate adding.

Thanks for the feedback as always :slight_smile:

Add custom styles from Mapbox Studio - July-24 update
Recently released a pretty simple, but very significant, update to the Beautiful Maps - Mapbox plugin.

You can now add custom styles from Mapbox Studio to maps in your Bubble app.

To add a custom style:

  • Select ‘Custom’ as the Style on the Mapbox Map element and then
  • Add your style URL to the new ‘Custom Style URL’ field

In this example, I’ve created a custom style in Mapbox studio based on the ‘Satellite Streets’ style, but I’ve shown all the ‘Parking’ areas in purple:

The demo app has been updated with instructions on how to do this :slight_smile:

1 Like

Custom Styles Example
Just wanted to share this example of creating custom styles in Mapbox Studio and then integrating them with your Bubble app.

This map shows the population density of all the US states based on the US Census Bureau data (if you want to get technical, it’s called a choropleth map):

You can see this map in the Beautiful Maps - Mapbox demo app (scroll to the section called ‘Custom Map Styles’)

Link to Mapbox tutorial:

Draggable markers - July-24 update
Just released a new version of the Beautiful Maps - Mapbox plugin (version 1.14.0) that allows you to drag markers on the Mapbox Map:

2024-07-17 17.28.33

It’s really easy to use. Simply set the ‘Draggable’ field to ‘yes’ on either the Add List of Markers or Add Single Marker actions.

There is also 3 new new exposed states on the Mapbox Map element:

  • Last Marker Dragged Unique ID
  • Last Marker Dragged Lng
  • Last Marker Dragged Lat

And 1 new event:

  • A Mapbox Map Marker Drag Ended

This can be useful if you want to make changes to the location associated with the marker AFTER the marker drag has been completed.

Any questions just let me know :slight_smile:

1 Like

Design custom maps in Mapbox Studio for your app (video tutorial)
Recently released this video on how you can design custom maps (with your own dataset) in Mapbox Studio and then add them to your Bubble app with the Beautiful Maps - Mapbox plugin:

Any questions, just let me know :slight_smile:

1 Like

Hello @alexcooney5
I’m so impressed with your work. I’m working on an app where I need to get some info (ex. unique id) about the markers that are visible on current map view. Then, I will use this info to filter my repeating group. Is this something possible?
Another solution could be getting the map boundaries lat & long (in states) and of course these boundaries with change when the user zoom in/out or move the map to other locations.
Please let me know if my idea is already implemented (and i’m not aware) or it is in your road-map.

Regards,
Hussain

Hi Hussain, thanks for the kind words!

This isn’t currently possible, but I should be able to implement functionality where the map’s boundaries are available via an exposed state.

Give me a day or so to look into this and I’ll get back to you with an update :slight_smile:

Hello @alexcooney5,

Thanks for your reply, sure take your time.

Hi @melqar, I’ve released a new version of the Beautiful Maps - Mapbox plugin (version 1.15.0). The Mapbox Map element now has 4 new exposed states that allow you to get a Map’s bounds:

  • North East Lng
  • North East Lat
  • South West Lng
  • South West Lat

These exposed states get updated each time a map shifts - EG see below:

Mapbox - Bounds

You should be able to use the bounds to determine which of your markers are currently visible on the map itself.

You can also see an example in the ‘Getting a Map’s bounds’ section of the demo app :slight_smile:

Can you let know if that’s what you’re looking for?

1 Like

@alexcooney5 wooooow this is exactly what I need. Million thanks you made my day :slight_smile:

1 Like

Great to hear @melqar! :slight_smile:

1 Like

Hi Alex -

Any luck on map marker hover & clicked states?!

How about extracting the map’s formatted address using cntr long&lat?

Best,
Zico

Hi @alexcooney5 . This plugin is cool. And the videos are really useful. Great work!

Is it possible to trigger a workflow by clicking the pop-up on the map (I know it’s possible clicking on the marker)?

Basically, I’m trying to create a user experience similar to Airbnb or Rightmove where:

(Step 1) the user clicks on the marker, which opens a popup containing summary information and,
(Step 2) the user can click on the popup to open a new tab that contains all of the information.

1 Like

New events/exposed states for marker hover - August-24 updates
Just released a new version (1.16.0) of the Beautiful Maps - Mapbox plugin that lets you trigger actions when a marker is hovered!

Mapbox - Marker Hover

In the above example, I’m showing an alert whenever a marker is hovered. You can see this in the ‘Triggering a workflow when a marker is hovered’ section of the demo app (editor link is here).

The plugin now has the following new events:

  • Mapbox Marker is Hovered
  • Mapbox Marker Marker Hover Ended

and the following exposed states:

  • Last Marker Hovered Unique ID
  • Last Marker Hovered Lat
  • Last Marker Hovered Lng

Any questions just let me know :slight_smile:

Hi @zico.gaeffke, I’ve just released a new version of the plugin that allow you to trigger workflows when a marker is hovered.

The plugin already has an event called ‘When Mapbox Marker is Clicked’

Is this what you’re looking for? Let me know if I’m missing something on this :slight_smile:

Do you mean the address of the location with the centre leg/lat coordinates? If so, I can look into this and see what I can do.

1 Like

Thanks for the kind words @rlowe012! Let me look into this and see what’s possible. Will report back in the next day or two with an update.

Hi @rlowe012, I’ve been looking into this and you should be able to navigate to a new tab by using some HTML.

You’ll see in the below example (which you can view here) that I’m using the ‘format as text:’ operator to load some custom HTML for each popup:

By following this approach, you should be able to add in a button/text/other element that allows users to navigate to another page. EG something like this:

Let me know if that helps :slight_smile: