Location Coordinates Map Widget

by
Odoo

7.78

v 15.0 Third Party 9
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 12308
Technical Name sol_map_coordinates_widget
LicenseLGPL-3
Versions 15.0 16.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 12308
Technical Name sol_map_coordinates_widget
LicenseLGPL-3
Versions 15.0 16.0

Map Coordinates Widget

Mark And Display Your Locations On The Map

Overview

It is a widget to display your locations on a map with the ability to mark new locations.

Get map coordinates for a specific location, store it, and then re-display that location.

Get the current location of your device.

Usage

To use the map inside your model you just need to:

Define a field to apply the widget on
map_form = fields.Char("Map Form")
Define fields to hold the latitude and longitude values for the location
location_latitude = fields.Float("Latitude")
location_longitude = fields.Float("Longitude")
Add "MapCoordinatesWidget" widget to the field inside the view
<field name="map_form" nolabel="0" widget="MapCoordinatesWidget" options="{'longitude': 'location_longitude', 'latitude': 'location_latitude', 'show_address_info' : '1', 'default_longitude': '2.294694', 'default_latitude': '48.858093',}"/>
Widget options:
Longitude: The name of the field in which the longitude of the location will be stored.
Latitude: The name of the field in which the latitude of the location will be stored.
Show_address_info: The details of the selected location will be displayed when set to "1".
Default_longitude: The default value for the location's longitude if the longitude field's value is empty.
Default_latitude: The default value for the location's latitude if the latitude field's value is empty.

You have to put this module in the dependencies of your module.

Latitude and longitude fields should be Float and you can use "digits=(8, 6)" to show coordinates clarity.

e.g. longitude = fields.Float(digits=(8, 6))

Latitude and longitude fields can't be read-only.

For the best map display, set a label for the map field.

Screenshots

Ali Badran
linkedin.com/in/ali-s-badran
ali-badran-95

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.