OdooWiki OCA HUB

Leaflet Map View (OpenStreetMap)

web_view_leaflet_map folder_open OCA/geospatial open_in_new
Extra Tools License: AGPL-3

This module extends odoo views, to add a new kind of view, named leaflet_map that is using the Leaflet javascript library to use maps. () This library is for exemple, used in the OpenStreetMap project. ()

You can see a simple usage in the module web_view_leaflet_map_partner in the same OCA repository that displays your contact in a map, if latitude and longitude are defined. (To define latitude and longitude, refer to the Odoo module base_geolocalize)

A marker will be displayed for each item that has a localization.

If user zooms out, the markers will overlap, which won't be very visible.

In that case, nearby markers are grouped together, thanks to Leaflet.markercluster plugin.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Adds a new 'Leaflet Map' view type to Odoo that displays records as markers on an OpenStreetMap map. Users can see records with coordinates, click markers to open records, and create new records from the map.

This module introduces a new view type called Leaflet Map, which can be used in any Odoo window action alongside list, form, or kanban views. When selected, records are shown as markers on an interactive map powered by the Leaflet library and OpenStreetMap tiles.

  • The map view displays a marker for each record that has latitude and longitude values. If many markers are close together, they are grouped into clusters that expand as you zoom in.
  • Clicking a marker opens a popup with the record's title and address (if configured). Clicking the popup opens the record's form view.
  • A 'New' button is available in the control panel to create a new record directly from the map.
  • The map's initial center is based on the company partner's latitude and longitude, and it automatically adjusts to fit all visible markers.
  • The view can be configured with options such as default zoom, maximum zoom, zoom snap, and which fields to use for latitude, longitude, title, address, and marker icon image. Marker icon size and popup anchor can also be customized.
  • The module extends the ir.ui.view and ir.actions.act_window.view models to allow 'leaflet_map' as a view mode, and adds a method to res.users to get the default map position from the company partner.
  • When uninstalled, it cleans up any window actions that used the leaflet_map view mode.

Depends on

base_geolocalizeweb_leaflet_lib
Models and fields (3)
  • res.users · extends an existing model
  • ir.ui.view · extends an existing modeltype
  • ir.actions.act_window.view · extends an existing modelview_mode

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 3 confirmed, 6 with no information of 9 versions.

Sources · Odoo 18.0

Confirmed on 2026-11-03 in branch 18.0 of OCA/geospatial.

terminal Installation and usage

OCA documentation · Odoo 18.0
  • See configuration of the module web_leaflet_lib.

No verified information in OCA: Installation, Usage.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.