🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Map Area & Route Drawing Setup Guide

Updated 9 min read Gravity Forms Integrations A–Z
On this page
  1. Video walkthrough
  2. What you need
  3. Install and activate
  4. Global settings
  5. Map defaults
  6. Map tiles
  7. Address search
  8. Add the field to a form
  9. Drawing tools
  10. Units
  11. What the length counts
  12. Rules
  13. Start position and map height
  14. Service area
  15. Address search box
  16. What visitors see
  17. Phones and tablets
  18. Keyboard and screen readers
  19. How the numbers are measured and checked
  20. Use the numbers in your form
  21. Calculations and prices
  22. Conditional logic
  23. Merge tags
  24. Entries, notifications and export
  25. Privacy and data
  26. Frequently asked questions
  27. Do I need a map API key?
  28. How accurate is the area?
  29. Can visitors draw several areas?
  30. Do overlapping areas count twice?
  31. Can I change the numbers in the entry?
  32. Does it work with multi-page forms and conditional logic?
  33. Changelog

Video walkthrough

Gravity Forms Map Area & Route Drawing Setup Guide: Measure Lawns, Fences & Routes on a Map
Video setup guide: Gravity Forms Map Area & Route Drawing Watch on YouTube

The Gravity Forms Map Area & Route Drawing add-on adds a Map Area & Route field to Gravity Forms. Your visitors draw areas, rectangles and lines on an OpenStreetMap map, and the field saves the area, the length and the shapes. The numbers can drive calculations, product prices, conditional logic, notifications and exports. Leaflet and the drawing tools ship inside the add-on, so there is no API key and no outside script. This guide covers installation, the settings, every field option, what visitors see, how the numbers are checked, and how to use them in your form.

A lawn mowing quote form: the Draw your lawn map with the drawing buttons, a six-corner lawn and an edging line drawn on the map, the total area and length under the map, the Area and Length boxes, and the mowing and edging prices calculated from them
A drawing on the form: the lawn and an edging line, the live numbers and the prices calculated from them.

What you need

  • WordPress 6.5 or newer and PHP 7.4 or newer.
  • Gravity Forms 2.9 or newer.
  • An active GravityExtra license key for this add-on. Every feature of the add-on needs a valid license.
  • Nothing else: no map account, no API key, no extra plugin.

Install and activate

  1. Download the add-on zip from your GravityExtra account and upload it in Plugins → Add New → Upload Plugin.
  2. Activate it.
  3. Open Forms → Settings → Map Area & Route, enter your license key and click Activate License.

Until the license is active, the field button is hidden, maps are not shown on forms (a form that already has the field still works without it), the merge tags are empty and the address search answers with an error.

Global settings

After activation the settings page has three sections.

Map defaults

The latitude, longitude and zoom where a new map opens. Each field can use its own start position instead. If you leave these empty, maps open on a world view until you set a field start position.

Map tiles

The map pictures (tiles) come from the standard OpenStreetMap tile server by default. It is free but run by volunteers and allows light use only, with the credit shown on the map. For a busy site, use your own tile server or a commercial tile provider: enter its URL template (it must contain {z}, {x} and {y}), the attribution it asks for (plain text and links) and the highest zoom it offers. The drawing and the numbers do not depend on the tiles: if the tiles cannot be loaded, visitors can still draw and see the numbers.

Off until you switch it on. When it is on, a search box above the map lets visitors type an address and jump to it. The request goes through your own server to Nominatim, the OpenStreetMap address service (or another search server you enter): at most one request per second for the whole site, only when the visitor presses Search or Enter, with a User-Agent that names the add-on and your site, plus your contact e-mail if you enter one. Answers are kept for a week, so repeated searches do not leave your server. The visitor’s IP address is not sent to the search service.

Add the field to a form

Open your form, find Map Area & Route in Advanced Fields and add it. Give it a clear label such as “Draw your lawn” or “Outline the roof”, and use the description to tell visitors what to draw. The field has three inputs: Area, Length and Shapes (GeoJSON). You can rename the first two in the field settings; their names are used on the form, in the entry and in the export.

The field settings in the form editor: drawing tools, area unit, length unit, what the length counts, required shape type, minimum and maximum area, most shapes, start position, map height, the address search option and the service area map with a drawn service area and its GeoJSON
The field settings, with the service area drawn on the small map.

Drawing tools

Tick the shapes visitors may draw: Area (polygon), Rectangle and Line or route. Edit, Delete shape, Undo and Clear all are always there. The server refuses shapes of a type that is not ticked, even if someone sends them without the form.

Units

Choose the area unit (square metres, square feet, hectares or acres) and the length unit (metres, feet, kilometres or miles). The saved numbers are in these units: square metres and feet with 2 decimals, hectares and acres with 4, kilometres and miles with 3, metres and feet with 2.

What the length counts

Lines and the outlines of areas (the default) adds the length of every line to the outline (perimeter) of every area: good for fencing, edging and gutters. Lines only counts the lines: good for routes, pipes and cables.

Rules

  • Required shape type: any shape, at least one area, or at least one line.
  • Minimum area and maximum area, in the area unit. Leave empty for no limit.
  • Most shapes: how many shapes one entry may have (10 by default, up to 50).
  • Required (the standard Gravity Forms setting): at least one shape must be drawn.

Visitors see a message next to the map as soon as a rule is broken, and the server checks the same rules when the form is sent.

Start position and map height

Enter the latitude, longitude and zoom where this map opens, for example the centre of your town at zoom 15, or a street at zoom 18. The map height is in pixels (420 by default). When a service area is set and no start position is given, the map opens on the service area.

Service area

Click Draw service area and draw the area you serve on the small map in the field settings. You can drag its corners afterwards, draw several areas, or paste a GeoJSON Polygon or MultiPolygon instead. Visitors see the service area as a dashed outline, and the form is only accepted when every shape lies inside it: every corner inside and no edge crossing the border.

When the address search is switched on in the global settings, each field shows the search box unless you untick Show the address search box.

What visitors see

Above the map are the drawing buttons. Each button has a text label and shows when it is active. Under the map, a status line says what to do next and gives the totals, a numbered list shows the area and outline of each area and the length of each line, and the Area and Length boxes show the values that will be sent.

  • Draw area: tap or click the map to add corners, then tap the first corner or Finish shape. Outlines that cross themselves are not allowed.
  • Draw rectangle: tap two opposite corners, or press and drag.
  • Draw line: add points, then tap the last point again or Finish shape.
  • Edit: drag corners to move them; tap Edit again when done.
  • Delete shape: tap a shape to remove it.
  • Undo: while drawing, removes the last corner; otherwise puts back the drawing as it was before the last change.
  • Clear all: removes every shape.
The same map field on a phone 390 pixels wide: the drawing buttons in two columns, an area drawn by touch, the total area and outline under the map and the Area and Length boxes
On a phone: large buttons in two columns and touch drawing.

Phones and tablets

Drawing works by touch. On narrow screens the buttons wrap into two columns and are at least 44 pixels tall, and the map fills the width of the form without sideways scrolling.

Keyboard and screen readers

Every button can be reached with Tab. The map can be focused: arrow keys move it and + and – zoom. While drawing an area or a line, a red cross marks the centre of the map; press Enter on the map (or Add point at the centre) to add a corner there, and Escape to cancel. The status line is announced to screen readers, and the list of shapes and the Area and Length boxes give the numbers as text, so the drawing can be checked without seeing the map.

How the numbers are measured and checked

The area is measured on the WGS84 ellipsoid with an equal-area method, and the length with geodesic distances (Vincenty’s formula, accurate to the millimetre). In our tests against a reference geodesy library, lawns, roofs, farms, routes and a one-degree box at 60° north all matched within 0.004%.

When the form is sent, your server reads the shapes (GeoJSON), checks them (readable, no crossing outlines, allowed tools, the number of shapes, the required shape type, the limits and the service area) and measures them again. If the area or length sent by the browser differs from the server’s numbers, the form is refused with the message “The measurements do not match the drawing”. The entry always keeps the numbers measured by the server and a cleaned copy of the shapes.

Use the numbers in your form

Calculations and prices

In a Number field with a calculation, or in a product price calculation, insert the field’s inputs from the merge tag list. For example:

  • {Draw your lawn:2.1} * 2.5 — area × 2.50 per square metre.
  • {Draw your lawn:2:length} * 4 — length × 4 per metre.

Both forms work: the input number (2.1 for the area, 2.2 for the length) or the field with the :area or :length modifier. The price updates as soon as the drawing changes.

Conditional logic

Area and Length appear in the conditional logic rules of other fields. For example, show a “Best day for a site visit” field when Area is greater than 1000, or show a delivery fee when Length is greater than 500.

Merge tags

  • {Label:ID}: a summary, for example “Area 1,201.77 m², length 169.93 m, 2 shapes”.
  • {Label:ID:area} and {Label:ID:length}: the value with its unit.
  • {Label:ID:area_value} and {Label:ID:length_value}, or {Label:ID.1} and {Label:ID.2}: the plain numbers.
  • {Label:ID:geojson}: the shapes as GeoJSON, for your own systems.
  • {Label:ID:link}: a link to OpenStreetMap at the drawing.

Entries, notifications and export

The entry screen: the area, the length and the number of shapes, a read-only map with the lawn and the edging line, the Open the location in OpenStreetMap link, and the calculated mowing and edging prices
The entry screen: values, a read-only map of the drawing and the map link.

The entry screen shows the area, the length, the number of areas and lines, a read-only map with the shapes, and a link to the location on OpenStreetMap. The entry list shows the summary. In notifications, {all_fields} lists the values with the map link, and the merge tags above give each value on its own. The CSV export has an Area column and a Length column, with the unit in the header and plain numbers in the cells, plus a Shapes (GeoJSON) column.

Privacy and data

The shapes are stored in the entry like any other field value. The map pictures are loaded by the visitor’s browser from the tile server you chose, so that server sees the visitor’s IP address; mention it in your privacy policy, or use your own tile server. The address search, when on, goes through your server, so the search service sees your server, not the visitor. Apart from the tiles, the optional search and the license and update checks, the add-on does not contact any outside service.

Frequently asked questions

Do I need a map API key?

No. Leaflet and the drawing tools are part of the add-on, and the default tiles come from OpenStreetMap without a key.

How accurate is the area?

The calculation follows the shape of the Earth (WGS84), so it is accurate for small lawns and large fields alike. The real limit is how carefully the visitor draws and how sharp the map pictures are at that zoom.

Can visitors draw several areas?

Yes. Areas are added together and lines are added together. Set the most shapes per entry in the field settings.

Do overlapping areas count twice?

Yes, each area is measured on its own. Ask visitors to draw separate parts side by side.

Can I change the numbers in the entry?

The numbers come from the drawing. To change them, edit the entry and redraw, or add a separate field for your own adjustment.

Does it work with multi-page forms and conditional logic?

Yes. The drawing is kept between pages and the map resizes when it is shown by conditional logic.

Changelog

1.0.0 (October 31, 2026): initial release.

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr