Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Google Map

Introduction

The Google Map component allows you to add an interactive map with customizable markers and controls to your form. It enables users to select locations, view map markers, and interact with the map by adding or changing markers. This component is included within the following NPM package: @react-form-builder/components-google-map.

The following sections describe the configuration and customization options available for the Google Map component. Customize it to suit your specific needs by setting the various properties listed below.

Also see the guide on how to use Google Maps to autocomplete an address.

Main properties

The following general properties are available within the Main tab:

NameTypeDescription
LatitudenumberSets the latitude of the map's center point
LongitudenumberSets the longitude of the map's center point
ZoomnumberControls the initial zoom level of the map
API KeystringGoogle Maps API key required to load the map
Map IDstringA map ID is an identifier that's associated with a specific map style or feature, more info
LanguagestringSpecifies a language for map localization, more info
RegionstringSets a specific map region, more info
Color SchemechoiceSets the map's color theme (DARK, LIGHT, FOLLOW_SYSTEM)
Map TypechoiceSpecifies the default map type (roadmap, satellite, terrain, hybrid)
Gesture HandlingchoiceDefines how users can interact with the map via gestures (none, auto, cooperative, greedy)
Show Map ControlbooleanDisplays map control options when enabled
Search placeholderstringPlaceholder text for the map search input
Map Control PositionchoiceSpecifies the position of the map control (e.g., top right, bottom left)
Add Marker on SearchbooleanIf enabled, adds a marker when a search is performed
Allow Multiple MarkersbooleanEnables multiple markers to be placed on the map. Default is false
Allow Changing MarkersbooleanIf enabled, allows users to add, move, or delete markers
Collision BehaviorchoiceManages how markers behave when they overlap
MarkersjsonMarker data
Marker window titlestringTitle for the marker window
Remove marker captionstringThe caption on the marker removal button

At the bottom of the Main properties menu, you can find additional options:

Style properties

These are properties that allow to customize the size, color and other style properties of your component:

  • For Device: You can provide component's style customization for all devices or specific devices by using this dropdown list. Refer to Adaptive Layout for more details.
  • Component > Class Name: Add a class name for your component for the subsequent styling if necessary.
  • Wrapper: The options below enable you to tailor the appearance of your component and customize it for a specific device type, as selected in the For Device property:

    NameTypeDescription
    WidthnumberSpecifies the width for your component
    HeightnumberSpecifies the height for your component
    Margin top/right/bottom/leftnumberMargin values for you component
    ColorstringAllows customizing the text color
    Background colorstringEnables customizing the background color
Stay in the know
Quickly Build Drag-and-Drop Forms
Star us on GitHub