Buzzy Documentation
  • Welcome to Buzzy
  • Getting Started with Buzzy
    • Getting Started Guide
      • 1. Starting with Buzzy AI
      • 2. The Buzzy Workspace
      • 3. Create a new app
      • 4. Preview and edit your app
      • 5. Manage your app
      • 6. Import your app to Figma
      • 7. Using Buzzy with Figma
      • 8. The Buzzy Figma plugin
      • 9. Creating a simple app
      • 10. Screens and navigation
      • 11. Forms, fields and data
      • 12. Data-driven menus & content
      • 13. Data edit and delete
      • 14. Search, sort and filter
      • 15. User login and registration
    • Buzzy AI or Figma first?
  • Working with Buzzy
    • Buzzy AI
      • About Buzzy AI
      • Kickstart with AI
      • Enhance with Figma
      • Extend with Code
      • Example prompts
      • Tips
      • Troubleshooting Buzzy AI
      • AI tokens and pricing
    • Buzzy for Figma
      • About Buzzy for Figma
      • Learning Figma
      • Creating a new app directly in Figma
        • Step by step version
      • Automarkup
      • Responsive layouts
      • Responsive layout checklist
      • Overflow and scrolling
      • Forms and fields
      • Images and galleries
      • Logging users in to your app
      • Theming
      • Troubleshooting Buzzy for Figma
      • Plugin error messages
    • Buzzy Deployment & App Stores
      • Setting up your custom Buzzy app
      • Connecting your own server
      • Apple & Google App Stores
    • Buzzy Marketplace
      • Buzzy Accreditation
    • Buzzy Project Guide
    • Buzzy App Examples
      • Buzzy Templates
      • AI-Powered Chat App
      • AI-Powered Custom T-Shirt App
      • AI-Powered Strategy App
      • AI-Powered Stock Portfolio App
      • Golf Course Finder
      • Personal Finance App with Figma AI
    • FAQs
  • The building blocks
    • Datatables, Fields & Data
      • Introduction to Fields
      • Basic Fields
        • Text
        • Number
        • Date
        • Location
        • Toggle
        • Checkboxes
        • Checklist
        • Selectlist
        • Rating
        • Attachments
        • Images
        • Signature
        • Audio Recording
        • Embedded Link
      • Advanced Fields
        • Formula
        • Sub tables
        • Linked Table field
        • Button
        • Teams
        • Payment
        • Notification
        • Event
        • User Vote
      • Display Fields
        • Header
        • Display Text
        • Image
        • Divider
      • Metadata Fields
        • Author Name
        • Author Phone
        • Submitted
      • Filter Controls
        • Viewers
        • Tags
        • Condition
      • External Fields
        • IBM Connections File
        • Box File
      • Sort Fields
      • Formulas
      • Datatable to Datatable Relationships
      • Security and Access Control
      • Displaying a field based on the values of other fields
      • Hiding a field based on role using a display formula
      • Importing data from a text file
      • Importing data from a URL
      • Import data from Datatable
      • Export data using Chrome
      • Export data in Browser
      • Export data using Safari
      • Datatable Field Type - Cheat Sheet
      • Troubleshooting Fields & Data
    • Code widget (custom code)
      • Code Widget Fields - Advanced Guide
      • New Async API + React HTML Components
      • Examples
        • Image Galley Slideshow
        • Ratings Average and Distribution
        • Event Locations Map
    • Analytics
  • Troubleshooting
    • App Error Codes
      • Action Error
      • App Not Found
      • Component Missing
      • Component Not Set
      • Component Settings Error
      • Datatable Not Found
      • Datatable Not Set
      • Field Not Found
      • Field Not Set
      • No App Selected
      • No Context Name
      • No Screens Found
      • Runtime Exception
      • Screen Not Found
      • Screen Not Set
    • Troubleshooting Buzzy AI
    • Troubleshooting Figma
  • REST API
    • Buzzy REST API
      • Integrating 3rd party applications
      • REST API
        • login
        • createappwithprompt
        • MicroApp Data Operations
          • microappdata
          • microappdata/row
          • insertmicroapprow
          • updatemicroapprow
          • removemicroapprow
          • microappchild
        • User & Organization Operations
          • userid
          • insertteammembers
          • teammembers
          • insertorganization
          • insertteam
        • enforceteammembership
      • Node.js API Client
      • Datatable Rules
      • Datatabledata Tutorial
      • Integrating with Mailchimp
      • Python Access Datatable
  • Advanced Deployment Settings
    • Installation
      • Pre-installation Planning
      • Deployment
        • Introduction to deployment
        • Minikube install guide
        • AWS ECS Fargate install guide
        • HCL Connections install guide
        • Azure AKS install guide
        • Windows container install guide
      • Buzzy settings
      • Whitelabelling Buzzy
      • Certificates
      • Release Management
    • Performance and Reliability
    • Security
      • Platform
      • Users and Roles
      • Datatables
      • Audit Trail
Powered by GitBook
On this page
  • Add a new table with a code widget
  • Generate the map code
  1. The building blocks
  2. Code widget (custom code)
  3. Examples

Event Locations Map

PreviousRatings Average and DistributionNextAnalytics

Last updated 10 days ago

For this example we'll use the default Events app that you can generate in Buzzy using the second default prompt and add a slideshow widget to it.

Create this app using the Create New App button in the Buzzy workspace and selecting the second default prompt that starts with "Create an event planning app...". Click through the steps in the app creation wizard to generate the brief and data model, select the "dark" theme, and then wait for the screens and sample data to be generated.

After the app is created, click on "Edit app" to open the AI assisted app editor.

Add a new table with a code widget

Firstly we need to add a new table to hold the code widget field. To do that enter this prompt:

Add a table called "Event Map" with a code widget field called "eventLocations". Set the field dimensions to 1 by 1.

You will be asked to confirm this change, click Yes and wait for the update to be completed.

The assistant should have added the table and code widget. Navigate to the Event List screen by clicking on See Events on the landing screen.

Add the code widget in it's own section on the screen which is where the map will be built:

Add a code widget section to this screen showing the eventLocations code widget from the Event Map table. Make it the first section on the screen.

Generate the map code

To generate the map code, navigate back to the Event List screen, make sure you are in edit mode and click on the blank space at the top of the screen under the header bar. You'll see a blue selection, which is the code widget field, but it has no code in it yet. To generate the code, enter this prompt:

Generate code to show all events on a map. There should be a pin in the map for each event with the name of the event in a label next to it. Clicking on a pin should show a popup with the event image on the left and the name and address on the right, using the Nunito font for the text. Clicking on the popup should open the detail screen for an event. Make sure the map is zoomed appropriately on loading up to show all the event pins, with up to 50 shown at once. And also make sure that changes to events, or new events, show up immediately on the map, but don't pan or zoom the map when these updates occur.

Confirm the change. This will take some time to generate and when the app reloads you'll need to navigate back to the Event List screen. Switch back to preview mode to test out your new map widget. You can drag the map around, zoom with the +/- buttons, click on pins to see the event details, and click on the popup to open the event. Note that scroll to zoon was purposely disabled as to not get in the way of scrolling the screen. You could ask the AI to re-enable scroll to zoom, or to use ctrl+scroll instead.

This type of widget configuration on a separate table allows for top level table data to be summarised (as there is no parent table in this case). It also allows for the combining data from multiple tables, and to use other fields in the table as settings for the code. Multiple rows in the table could represent different maps for example, and a view component could then be used to show these maps in a list to be opened and viewed separately.

Event map showing a location and popup information bubble