Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Technical
  3. Geo Base - Geo Polygon Map Widget v 19.0
  4. Sales Conditions FAQ

Geo Base - Geo Polygon Map Widget

by Nezam https://www.nezam.co
Odoo

$ 99.99

v 19.0 Third Party
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 694
Technical Name nz_geo_base
LicenseLGPL-3
Websitehttps://www.nezam.co
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 694
Technical Name nz_geo_base
LicenseLGPL-3
Websitehttps://www.nezam.co
Community
Enterprise
On Premise
Odoo Online
Odoo.sh

NZ Solutions Apps for Odoo

Geo Base — Geo Polygon Map Widget — Odoo 19

Add a fully interactive geographic polygon map field to any Odoo model. Let users draw, edit, and manage zone boundaries directly on an OpenStreetMap map — with numbered markers, midpoint insertion, undo history, GPS location, and instant area calculation.

NZ Solutions
Email Us +20 1550935225
Geo Polygon Map Widget Demo

Usage

Add nz_geo_base to your module's depends list, then use the widget on any Text or Char field:

<field name="my_geo_field" widget="nz_geo_map"/>

Data Format

The field value is stored as JSON:

{"points": [[lat1, lng1], [lat2, lng2], ...], "type": "polygon"}

What does this module provide?

This module provides a reusable OWL field widget (nz_geo_map) that renders an interactive Leaflet map on any Text or Char field, allowing users to draw polygon zones by clicking on an OpenStreetMap map; drag markers to adjust zone boundaries with full undo history; insert midpoints between existing vertices by hovering a segment and clicking the ghost marker; and calculate zone area automatically in m² or km². The polygon data is stored as compact JSON and the widget works in both edit and read-only modes. Install once and reuse the widget in any addon with zero extra assets.

KEY HIGHLIGHTS

Interactive Polygon Drawing

Click anywhere on the OpenStreetMap to add vertices. Each click appends a numbered, draggable marker and the polygon outline updates in real time with a distinctive purple dashed border.

Drag Markers to Reshape

Every vertex marker is draggable. Grab any numbered pin and move it to refine the zone boundary. Dragging is recorded in the undo history so mistakes are instantly reversible.

Insert Midpoint on Hover

Hover over any polygon segment to reveal a ghost + marker at its midpoint. Click it to insert a new vertex exactly there — no need to delete and redraw the zone.

Delete Points with Ease

Left-click a marker to open a popup with a Delete button, or right-click for an instant removal. Both actions are captured in the undo stack so nothing is irreversible.

Undo History & Clear All

Every add, drag, insert, and delete operation is pushed to an undo stack. Hit Undo to step back one action at a time, or use Clear All to reset the entire polygon at once.

Live Area Calculation

The widget auto-calculates the zone area using the spherical Shoelace formula and displays it live in m² or km² as you draw, drag, or delete points.

  • Screenshots
  • Features
  • FAQ
  • Releases

1) Empty Map — Ready to Draw

When the field has no value, the widget opens an OpenStreetMap centered on Cairo, Egypt at zoom level 13. The toolbar shows Undo, Clear All, Fit to Zone, My Location, and Toggle Numbers buttons. Click anywhere on the map to start placing polygon vertices.

Empty map ready for drawing

2) Drawing a Polygon — Numbered Markers

Each map click appends a numbered, draggable pin. The widget draws a purple dashed polygon once 3 or more points exist and instantly displays the point count and calculated area in the toolbar. Markers are numbered sequentially so you always know the zone outline.

Polygon being drawn with numbered markers

3) Drag a Marker to Reshape the Zone

Grab any numbered pin and drag it to a new position. The polygon redraws in real time and the area counter updates instantly. The drag start is recorded in the undo history — press Undo to snap the marker back to where it was.

Marker being dragged to reshape the polygon

4) Delete a Point — Popup or Right-Click

Left-click a marker to open a Leaflet popup showing the point number and a red Delete this point button. Alternatively, right-click the marker for instant removal. Both methods push a snapshot to the undo stack before deleting.

Delete point popup on marker click

5) Insert Midpoint — Hover a Segment

Hover over any side of the polygon to reveal a ghost + marker at the segment midpoint. Click it to insert a new vertex exactly between the two neighboring points — the polygon updates immediately and markers are renumbered.

Ghost midpoint marker revealed on segment hover

6) Undo & Clear All

The Undo button restores the previous polygon snapshot — every add, drag, insert, and delete is reversible. Clear All removes every marker and resets the field value to an empty polygon, also captured in the undo stack.

Undo and Clear All buttons in the toolbar

7) Toggle Number Labels

The Toggle Numbers button switches marker labels on or off. When off, the pin divs are hidden and only the filled polygon shading remains visible — useful for a clean screenshot or a dense zone with many points.

Markers with number labels toggled off

8) My Location & Fit to Zone

My Location uses the browser Geolocation API to fly the map to the device's GPS position and place a pulsing blue dot. Fit to Zone calls fitBounds on the current polygon so you always see the full zone with 20 % padding regardless of the current zoom level.

My Location pulse marker and Fit to Zone button
Interactive polygon drawing: Click anywhere on the OpenStreetMap to append a numbered, draggable vertex. The polygon outline updates instantly as you add each point.
Drag markers to reshape: Every vertex pin is draggable. Move it to refine the zone boundary; the drag action is recorded in the undo history for instant reversal.
Midpoint ghost marker insertion: Hover over any polygon segment to reveal a ghost + marker at its midpoint. Click to insert a new vertex without redrawing the zone.
Delete via popup or right-click: Left-click a marker to open a popup with a Delete button, or right-click for instant removal. Both methods support undo.
Full undo history stack: Every add, drag, insert, and delete operation is pushed to an undo stack. Press Undo to step back one action at a time.
Clear All button: Remove every marker and reset the field value to an empty polygon with a single click — also captured in the undo history.
Live area calculation: The widget computes zone area using the spherical Shoelace formula and displays the result live in m² (under 1 km²) or km².
Point count display: The toolbar always shows the current number of polygon vertices so users have a quick overview of zone complexity.
Toggle number labels: Show or hide the sequential numbers on all vertex markers with one click — useful for dense zones or clean screenshots.
Fit to Zone button: Auto-fits the map view to the polygon bounds with 20 % padding so the full zone is always visible regardless of current zoom level.
My Location (GPS): Flies the map to the device's GPS coordinates and places a pulsing blue dot using the browser Geolocation API.
Read-only mode: In non-editable views the map renders the saved polygon with all editing controls disabled, keeping the zone preview always accessible.
JSON data format: Polygon data is stored as compact JSON {"points": [[lat, lng], ...], "type": "polygon"} compatible with any Text or Char field.
Reusable across addons: Install nz_geo_base once and reference the nz_geo_map widget in any dependent addon without adding extra JavaScript assets.
Leaflet.js 1.9.4 on demand: The Leaflet CSS and JS are loaded asynchronously only when the widget mounts, keeping the backend footprint minimal.
Odoo 19 ready: Built for Odoo 19 Community and Enterprise. Depends only on the Web module — no extra Python or ORM dependencies required.
How do I add the map widget to my own module?

Add nz_geo_base to your module's depends list, then declare the field in your view XML as <field name="my_field" widget="nz_geo_map"/>. The field can be of type Text or Char.

What format is the polygon data stored in?

The value is stored as a JSON string: {"points": [[lat1, lng1], [lat2, lng2], ...], "type": "polygon"}. You can read and process this in Python or JavaScript with a standard JSON parser.

What map tiles does the widget use?

The widget uses OpenStreetMap tiles (tile.openstreetmap.org) via Leaflet.js 1.9.4. No API key is required and the tiles are loaded from a public CDN at no cost.

Where does the map open by default?

When no data exists in the field, the map centers on Cairo, Egypt (30.0444, 31.2357) at zoom 13. When existing polygon data is present, the map auto-fits to the polygon bounds at zoom 15.

How is the zone area calculated?

The widget uses the spherical Shoelace formula with Earth's radius set to 6 371 000 m. Results under 1 km² are displayed in m²; larger zones are shown in km² with two decimal places.

Can I use the widget in read-only views?

Yes. In read-only mode the polygon is rendered with the same purple styling but all editing controls (click-to-add, drag, insert, delete) are disabled. The Fit to Zone and My Location buttons remain active.

Does the My Location button require any server permission?

No server changes are needed. The button calls the standard browser Geolocation API. The user must allow location access in their browser when prompted — no GPS data is sent to the server.

Which Odoo editions and deployment modes are supported?

The module is compatible with Odoo 19 Community and Enterprise on On-Premise, Odoo Online, and Odoo.sh. It depends only on the Web module and has no additional Python dependencies.

Version 19.0.1.0.0
Initial Release
  • Interactive polygon drawing by clicking on OpenStreetMap
  • Numbered, draggable vertex markers with full undo history
  • Midpoint ghost marker insertion on segment hover
  • Delete-point popup (left-click) and instant right-click removal
  • Clear All and Undo Last buttons
  • Live area calculation using the spherical Shoelace formula (m² / km²)
  • Toggle number labels visibility on all markers
  • Fit to Zone — auto-fit map view to polygon bounds
  • My Location — GPS fly-to with pulsing blue dot marker
  • Read-only mode with polygon preview and no editing controls
  • JSON data storage compatible with Text and Char field types
  • Reusable OWL widget — install once, use in any addon
  • Leaflet.js 1.9.4 loaded on demand — no backend footprint
  • Odoo 19 Community & Enterprise support

Our Services

Odoo Customization
Odoo Implementation
Odoo Support
Odoo Migration
Odoo Integration
Odoo Consultancy
Odoo Licensing
Hire Odoo Developer
© 2026 NZ Solutions - All rights reserved.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with