Skip to main content

Customize Geolocation Map in Frappe Framework v15

Introduction & Context

Maps are no longer optional in modern ERP systems. Whether you are tracking customers, vendors, assets, or field staff, geolocation visualization adds immediate operational clarity.

In Frappe Framework v15, geolocation maps are built directly into the Desk interface and can be customized using standard DocType fields—without third-party plugins or custom JavaScript. This guide explains how geolocation maps work in Frappe v15 and how to configure them correctly.

What Is a Geolocation Map in Frappe?

Answer:
A geolocation map in Frappe is a built-in map view that plots DocType records on a map using latitude and longitude fields.

The map view allows users to:

  • Visualize records spatially
  • Identify geographic clusters
  • Navigate directly to records from the map

It is fully integrated with List and Report views.

How Does Geolocation Mapping Work in Frappe v15?

Frappe uses two numeric fields to plot locations:

  • Latitude
  • Longitude

When these fields are present and configured in a DocType, Frappe automatically enables a Map View for that DocType.

No custom API calls or external map SDKs are required.

Technical Prerequisites

Before enabling geolocation maps, ensure:

  • Frappe Framework version is v15
  • Developer Mode is enabled
  • You have permission to customize DocTypes

The DocType represents location-based data (customers, leads, assets, etc.)

How to Enable Geolocation Map for a DocType

Step 1: Add Latitude and Longitude Fields

Answer:
To enable a map view, the DocType must contain two fields of type Float.

Required field names (recommended):

  • latitude
  • longitude

These fieldnames are automatically detected by Frappe.

Step 2: Save and Reload the DocType

Once fields are added:

  • Save the DocType
  • Reload Desk

Frappe will now recognize the DocType as map-enabled.

How to Access the Map View in Desk

Answer:
After configuration, the Map View becomes available from the DocType’s view selector.

Steps:

  • Open the DocType list
  • Click the view switcher (top-right)
  • Select Map

All records with valid latitude and longitude values will appear on the map.

Implementation Details

Supported Field Types

Field Type Required
Latitude Float Yes
Longitude Float Yes

Records without values in these fields are automatically excluded from the map.

How Frappe Handles Map Rendering

  • Map rendering is handled internally by the Desk UI
  • No hooks or custom JavaScript are required
  • Performance is optimized using server-side filtering

User Guidance: Best Use Cases for Geolocation Maps

Geolocation maps are ideal for:

  • Customer and Lead tracking
  • Asset and equipment locations
  • Site and project mapping
  • Delivery or service coverage analysis

They help teams see patterns instantly instead of interpreting rows of data.

Best Practices & Tips

  • Always validate latitude and longitude inputs
  • Use decimal degrees format (e.g., 23.0225, 72.5714)
  • Avoid storing coordinates as text
  • Combine map view with filters for clarity
  • Keep coordinate fields read-only if auto-filled

Advanced Topics

Auto-Populating Latitude and Longitude

While Frappe does not auto-geocode by default, coordinates can be populated via:

  • Custom scripts
  • API integrations
  • External geocoding services

Once values exist, the map updates automatically.

Combining Map View with Filters

Map View respects list filters. This allows:

  • Region-based visualization
  • Status-based location tracking
  • Time-bound geographic analysis

This is especially useful for sales and operations teams.

Integration Patterns

Geolocation maps integrate seamlessly with:

  • CRM modules
  • Asset Management
  • Project sites
  • Field Service workflows

They enhance decision-making without adding UI complexity.

Troubleshooting Common Issues

Map View Not Visible

  • Ensure both latitude and longitude fields exist
  • Verify field type is Float
  • Reload Desk after customization

Records Not Appearing on Map

  • Check for empty coordinate values
  • Validate numeric format
  • Confirm user permissions

Industry Relevance

Geolocation maps are widely used in:

  • Real estate ERP solutions
  • Logistics and delivery systems
  • Sales territory planning
  • Asset-heavy industries

They reduce operational blind spots and improve planning accuracy.

Target Audience

This guide is designed for:

  • ERPNext Developers
  • Frappe Framework Customizers
  • ERP Consultants
  • Business Analysts working on location-based data

Summary: Why Geolocation Maps Matter in Frappe v15

Geolocation maps in Frappe Framework v15 provide a powerful, no-code way to visualize location-based data directly inside ERPNext. With just two fields, teams gain spatial insight that improves planning, execution, and decision-making—making maps an essential feature, not an add-on.

Rating: 0 / 5 (0 votes)