[PLUGIN] - Google Maps (native mobile)

Hi all,

Native Google Maps plugin available with a ton of features in it. It’s been provisionally made available but it’s still very much in development and they’ll be more to add over the next few weeks. It’s an extensive, well documented plugin with a lot of thought and effort put into it.

The editor link along with the instructions/documentation, can be seen here:
Please note this is a native plugin so you won’t be able to view it directly through the browser, you’ll need to use the BubbleGo app once it’s installed.
https://bubble.io/page?id=paul-testing-4&tab=Design&name=Home&type=page

The plugin link is here:
https://bubble.io/plugin/google-maps-native-mobile-1780913784036x145550589994729470


As of current, the details are as follows:

So, this a real Google map for native mobile apps, drawn by the device itself rather than in a web view, so it stays fast and smooth even when tilted and rotated. The same Google map on both iOS and Android, with markers, drawing tools, buffer zones, and full GeoJSON, KML and WMS layer support.

Everything that happens on the map comes back in states, so things like the camera view, the visible area, taps and long-presses, selected features, full lists of markers, shapes and loaded features etc. The map is drawn natively by the device rather than inside a web view.

The map

  • Native Google Maps on iOS and Android (through react-native-maps), not Apple Maps on iPhones.
  • A full camera model: centre, zoom, heading (rotation) and pitch (tilt), reported back live.
  • Choose the map type: standard, satellite, hybrid or terrain.
  • Apply your own custom map styling (JSON) to restyle roads, water, labels and more.
  • Toggle each gesture independently: zoom, scroll, rotate and tilt.
  • Set minimum and maximum zoom limits to keep users within a sensible range.
  • Optional overlays: user location, my-location button, compass, scale, 3D buildings, live traffic, indoor maps and points of interest.
  • Map padding on each side, so controls and overlays sit clear of your own interface.
  • Taps, long-presses and the visible bounding box all exposed to your workflows.
  • Set camera action to glide the view to any position, zoom, rotation or tilt.

Markers and shapes

  • Add markers and shapes (polygons, polylines, rectangles, circles) from your data in one action.
  • Custom marker icons, labels, colours, draggable markers, and tappable popovers.
  • Per-shape fill, stroke and width, with a separate selected style.
  • Update or remove any marker or shape by id without rebuilding the map.
  • Markers-in-shapes detection: know which markers fall inside which areas.

Drawing tools

  • An optional on-map toolbar so users can draw markers, lines, rectangles, circles and polygons by hand.
  • Tap to place, drag handles to reshape, with single-step undo.
  • Choose the toolbar position, and show or hide the colour palette, delete button and marker icon.
  • Every drawn feature is reported to your workflows with its coordinates.

Buffer areas

  • Generate a buffer zone a set distance around any shape, for catchment and contingency areas.
  • Polygons get a rounded buffer; circles get a concentric circle.
  • Each buffer carries its own area and perimeter measurements.

GeoJSON and KML layers

  • Load GeoJSON or KML onto the map from a URL or pasted text, as a removable layer.
  • Style every feature uniformly, or drive fill, stroke and width from feature properties with conditions (for example, colour by population).
  • KML files keep their own embedded styles by default, which you can selectively override.
  • Tappable features with property-substituted popovers, published to a single typed layers list.
  • Performance controls for large files: feature caps, geometry simplification, and display-only modes.

WMS and tile layers:

  • Load a WMS service as a map overlay, with control over layers, version, styles, projection, format and opacity.
  • Tap the map to query a WMS layer (GetFeatureInfo) and read the response back in a state, with optional content filtering.
  • Load generic XYZ/TMS tile sources from a URL template, for open tile providers and custom basemaps.
  • For WFS services, point the Load GeoJSON action at your GetFeature URL, since the response is GeoJSON.
  • One Remove layer action handles every format, by layer, by feature, or all at once.

Data and output

  • All map data exposed as typed states that drop straight into repeating groups and elements.
  • Coordinates provided in several formats so they round-trip cleanly back into the plugin.
  • Fit to bounds, clear map, and full selection handling included.
  • Debug log you can copy for troubleshooting.

In development

This plugin is an active, working project that is being added to over time. Everything described
above is built and working. Features still planned include:

  • Exporting layers.
  • Checking for intersections between shapes.
  • Marker clustering for large numbers of markers.
  • Map address search element.
  • Live dynamic markers and shapes.
  • Plus a few more things in the pipeline.

Paul

New features added, all are configurable.

  • GeoJSON and shape intersection.
    The Layers state contains all data loaded from GeoJSON, KML, and WMS sources. When a shape is drawn on the map and intersects with features from any supported layer, the IDs of those shapes are automatically added to the intersecting_shape_ids field.

    There’s also a new setting called Features above shapes that will allow you to visually change the stacking behaviour (not seen in the above screenshot!)

  • Marker clustering
    Full support for marker clustering now included with a bunch of options you can use to control styling and basic features.

  • Tooltips for the drawing tools UI (to aid with mobile functionality)
    Sometimes it might be useful to have some tooltips appear instructing users how to interact with the map in regards to how shapes are drawn using finger movements. These tooltips can be switched on using the relevant options. There’s a slightly different instruction depending on icon selected.

well done man. much needed

Thanks @adig

Live marker/shape functionality has also been included, so now data that changes in your database will automatically be reflected on the map.

This is just an alternative way to load markers/shapes, as previously you would have had to run the corresponding Create markers or Create shapes action which sets markers/shapes as static objects on the map.

There are two new options that control this, shown below. The documentation explains how it works in further detail, but essentially a JSON object is passed using the :format as text operator and it reads the data from there. When the data changes, the object updates which then makes the changes on the map.

They’ll be a built in address search element coming soon.

Paul

Last update:

The search address bar has been included as a separate component that looks like the image below. It has plenty of options available available, both functional and styling.

The search element requires your Google API key supplied in the plugin options and it needs to have access to the Places (new) API.

Paul