Google Maps Map instance and advanced markers

Hi,

I have the following requirements;

  1. Display a list of products on a map with custom markers.
  2. The products/markers can only be displayed if they are located within the current map view.
  3. Everytime the map view changes the database is queried and the relevant products are displayed.

I am currently using Xano as my database and Mapbox as my map and this functionality works well. It works because I am able to calculate the map view from the getBounds() methods that provides a radius and allows the database to be searched based on the radius.

The issue with Mapbox is the lack of capability to annotate markers dynamically with the property values from product collection. I need to show price and description text properties overlayed on markers. This is quite disappointing as Mapbox seems to have better styling than google maps.

I have started looking at the google map plugin provided by Weweb to see if my issue can be solved by Google maps, but the Weweb implementation does not seem to be equivalent to the Mapbox plugin. The lifecycle events appear to be more limited. For example I can only see a onMapClick() event for google maps and no onMapLoad() event or other events.

Also there appears to be no map instance object for google maps to access in workflows.

Can Weweb please answer the following questions;

  1. How can the google map object be accessed in code ?

What methods can be called on the map object? Is getBounds() possible?

  1. How can the following google map events be accessed in workflows ?

bounds_changed
center_changed
contextmenu
dblclick
drag
dragend
dragstart
heading_changed
idle
maptypeid_changed
projection_changed
resize
rightclick
tilesloaded
tilt_changed
zoom_changed

  1. Can I use AdvancedMarker library be used in Weweb ?

All I need to do is;

Calculate the bounds of the map, query database and refresh markers based on map bounds and show markers with overlayed text from product properties.

Can this be done with Webweb and Google maps ?

Thanks

Wayne