diff --git a/setup/web_leaflet_lib/odoo/addons/web_leaflet_lib b/setup/web_leaflet_lib/odoo/addons/web_leaflet_lib new file mode 120000 index 0000000000..892613935d --- /dev/null +++ b/setup/web_leaflet_lib/odoo/addons/web_leaflet_lib @@ -0,0 +1 @@ +../../../../web_leaflet_lib \ No newline at end of file diff --git a/setup/web_leaflet_lib/setup.py b/setup/web_leaflet_lib/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/web_leaflet_lib/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/web_leaflet_lib/README.rst b/web_leaflet_lib/README.rst new file mode 100644 index 0000000000..6681def664 --- /dev/null +++ b/web_leaflet_lib/README.rst @@ -0,0 +1,121 @@ +========================== +Leaflet Javascript Library +========================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:e5af47c08dbb573c870e80a506feaccced35a36e61e63c6d39644fa84a357de1 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fgeospatial-lightgray.png?logo=github + :target: https://github.com/OCA/geospatial/tree/16.0/web_leaflet_lib + :alt: OCA/geospatial +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/geospatial-16-0/geospatial-16-0-web_leaflet_lib + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/geospatial&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends odoo to include Leaflet Javacript library. + +This module is used by ``web_view_leaflet_map``. + +**Important Note** + +The javascript library is opensource and distributed under BSD 2 Licence. +See : https://github.com/Leaflet/Leaflet/blob/main/LICENSE +You can so use it freely. + +However, display maps requires to display layers provided by tiles servers, that +requires ressources. + +**For testing purpose** + +You can use the openStreetMap url ``https://tile.openstreetmap.org/{z}/{x}/{y}.png`` or other, listed in that page : https://wiki.openstreetmap.org/wiki/Tile_servers + +Apart from very limited testing purposes, you should not use the tiles supplied by OpenStreetMap.org itself. OpenStreetMap is a volunteer-run non-profit body and cannot supply tiles for large-scale commercial use. + +**Regular / High Usage** + +- you can contact one of the following companies : https://switch2osm.org/providers/ + +- You can also install yourself your own tiles servers. See documentation : https://switch2osm.org/serving-tiles/ + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +* Go to Settings > Technical > Parameters > System Parameters + +* Create or edit the parameter with the key ``leaflet.tile_url`` + +* As a value, set the url of the tiles server you chose. (See description) + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* GRAP + +Contributors +~~~~~~~~~~~~ + +* Sylvain LE GAL (https://www.twitter.com/legalsylvain) + +Other credits +~~~~~~~~~~~~~ + +The module embed the Leaflet.js library. + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px + :target: https://github.com/legalsylvain + :alt: legalsylvain + +Current `maintainer `__: + +|maintainer-legalsylvain| + +This module is part of the `OCA/geospatial `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/web_leaflet_lib/__init__.py b/web_leaflet_lib/__init__.py new file mode 100644 index 0000000000..6d58305f5d --- /dev/null +++ b/web_leaflet_lib/__init__.py @@ -0,0 +1,2 @@ +from . import models +from .hooks import pre_init_hook diff --git a/web_leaflet_lib/__manifest__.py b/web_leaflet_lib/__manifest__.py new file mode 100644 index 0000000000..890852e255 --- /dev/null +++ b/web_leaflet_lib/__manifest__.py @@ -0,0 +1,25 @@ +# Copyright (C) 2024 - Today: GRAP (http://www.grap.coop) +# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Leaflet Javascript Library", + "summary": "Bring leaflet.js librairy in odoo.", + "version": "16.0.1.0.0", + "author": "GRAP, Odoo Community Association (OCA)", + "maintainers": ["legalsylvain"], + "website": "https://github.com/OCA/geospatial", + "license": "AGPL-3", + "category": "Extra Tools", + "depends": ["base"], + "data": ["data/ir_config_parameter.xml"], + "demo": ["demo/ir_config_parameter.xml"], + "assets": { + "web.assets_backend": [ + "/web_leaflet_lib/static/lib/leaflet/leaflet.css", + "/web_leaflet_lib/static/lib/leaflet/leaflet.js", + ], + }, + "installable": True, + "pre_init_hook": "pre_init_hook", +} diff --git a/web_view_leaflet_map/data/ir_config_parameter.xml b/web_leaflet_lib/data/ir_config_parameter.xml similarity index 100% rename from web_view_leaflet_map/data/ir_config_parameter.xml rename to web_leaflet_lib/data/ir_config_parameter.xml diff --git a/web_view_leaflet_map/demo/ir_config_parameter.xml b/web_leaflet_lib/demo/ir_config_parameter.xml similarity index 100% rename from web_view_leaflet_map/demo/ir_config_parameter.xml rename to web_leaflet_lib/demo/ir_config_parameter.xml diff --git a/web_leaflet_lib/hooks.py b/web_leaflet_lib/hooks.py new file mode 100644 index 0000000000..4cf094ea32 --- /dev/null +++ b/web_leaflet_lib/hooks.py @@ -0,0 +1,14 @@ +def pre_init_hook(cr): + # move configuration from web_view_leaflet_map + # into web_leaflet_lib, if exists. + cr.execute( + """ + UPDATE ir_model_data + SET module='web_leaflet_lib' + WHERE module = 'web_view_leaflet_map' + AND name in ( + 'config_parameter_leaflet_copyright', + 'config_parameter_leaflet_tile_url' + ) + """ + ) diff --git a/web_leaflet_lib/i18n/fr.po b/web_leaflet_lib/i18n/fr.po new file mode 100644 index 0000000000..a8b2b7c665 --- /dev/null +++ b/web_leaflet_lib/i18n/fr.po @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_leaflet_lib +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-10-12 20:11+0000\n" +"PO-Revision-Date: 2024-10-12 20:11+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: web_leaflet_lib +#: model:ir.model,name:web_leaflet_lib.model_ir_http +msgid "HTTP Routing" +msgstr "Routage HTTP" diff --git a/web_leaflet_lib/models/__init__.py b/web_leaflet_lib/models/__init__.py new file mode 100644 index 0000000000..9a5eb71871 --- /dev/null +++ b/web_leaflet_lib/models/__init__.py @@ -0,0 +1 @@ +from . import ir_http diff --git a/web_view_leaflet_map/models/ir_http.py b/web_leaflet_lib/models/ir_http.py similarity index 100% rename from web_view_leaflet_map/models/ir_http.py rename to web_leaflet_lib/models/ir_http.py diff --git a/web_leaflet_lib/readme/CONFIGURE.rst b/web_leaflet_lib/readme/CONFIGURE.rst new file mode 100644 index 0000000000..cf45731ceb --- /dev/null +++ b/web_leaflet_lib/readme/CONFIGURE.rst @@ -0,0 +1,5 @@ +* Go to Settings > Technical > Parameters > System Parameters + +* Create or edit the parameter with the key ``leaflet.tile_url`` + +* As a value, set the url of the tiles server you chose. (See description) diff --git a/web_leaflet_lib/readme/CONTRIBUTORS.rst b/web_leaflet_lib/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..e1525ce042 --- /dev/null +++ b/web_leaflet_lib/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Sylvain LE GAL (https://www.twitter.com/legalsylvain) diff --git a/web_view_leaflet_map/readme/CREDITS.rst b/web_leaflet_lib/readme/CREDITS.rst similarity index 100% rename from web_view_leaflet_map/readme/CREDITS.rst rename to web_leaflet_lib/readme/CREDITS.rst diff --git a/web_leaflet_lib/readme/DESCRIPTION.rst b/web_leaflet_lib/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..882413671e --- /dev/null +++ b/web_leaflet_lib/readme/DESCRIPTION.rst @@ -0,0 +1,24 @@ +This module extends odoo to include Leaflet Javacript library. + +This module is used by ``web_view_leaflet_map``. + +**Important Note** + +The javascript library is opensource and distributed under BSD 2 Licence. +See : https://github.com/Leaflet/Leaflet/blob/main/LICENSE +You can so use it freely. + +However, display maps requires to display layers provided by tiles servers, that +requires ressources. + +**For testing purpose** + +You can use the openStreetMap url ``https://tile.openstreetmap.org/{z}/{x}/{y}.png`` or other, listed in that page : https://wiki.openstreetmap.org/wiki/Tile_servers + +Apart from very limited testing purposes, you should not use the tiles supplied by OpenStreetMap.org itself. OpenStreetMap is a volunteer-run non-profit body and cannot supply tiles for large-scale commercial use. + +**Regular / High Usage** + +- you can contact one of the following companies : https://switch2osm.org/providers/ + +- You can also install yourself your own tiles servers. See documentation : https://switch2osm.org/serving-tiles/ diff --git a/web_leaflet_lib/static/description/icon.png b/web_leaflet_lib/static/description/icon.png new file mode 100644 index 0000000000..9a516f2f8a Binary files /dev/null and b/web_leaflet_lib/static/description/icon.png differ diff --git a/web_leaflet_lib/static/description/index.html b/web_leaflet_lib/static/description/index.html new file mode 100644 index 0000000000..655af50d89 --- /dev/null +++ b/web_leaflet_lib/static/description/index.html @@ -0,0 +1,454 @@ + + + + + +Leaflet Javascript Library + + + +
+

Leaflet Javascript Library

+ + +

Beta License: AGPL-3 OCA/geospatial Translate me on Weblate Try me on Runboat

+

This module extends odoo to include Leaflet Javacript library.

+

This module is used by web_view_leaflet_map.

+

Important Note

+

The javascript library is opensource and distributed under BSD 2 Licence. +See : https://github.com/Leaflet/Leaflet/blob/main/LICENSE +You can so use it freely.

+

However, display maps requires to display layers provided by tiles servers, that +requires ressources.

+

For testing purpose

+

You can use the openStreetMap url https://tile.openstreetmap.org/{z}/{x}/{y}.png or other, listed in that page : https://wiki.openstreetmap.org/wiki/Tile_servers

+

Apart from very limited testing purposes, you should not use the tiles supplied by OpenStreetMap.org itself. OpenStreetMap is a volunteer-run non-profit body and cannot supply tiles for large-scale commercial use.

+

Regular / High Usage

+ +

Table of contents

+ +
+

Configuration

+
    +
  • Go to Settings > Technical > Parameters > System Parameters
  • +
  • Create or edit the parameter with the key leaflet.tile_url
  • +
  • As a value, set the url of the tiles server you chose. (See description)
  • +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • GRAP
  • +
+
+ +
+

Other credits

+

The module embed the Leaflet.js library.

+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

legalsylvain

+

This module is part of the OCA/geospatial project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/web_view_leaflet_map/static/lib/leaflet/images/layers-2x.png b/web_leaflet_lib/static/lib/leaflet/images/layers-2x.png similarity index 100% rename from web_view_leaflet_map/static/lib/leaflet/images/layers-2x.png rename to web_leaflet_lib/static/lib/leaflet/images/layers-2x.png diff --git a/web_view_leaflet_map/static/lib/leaflet/images/layers.png b/web_leaflet_lib/static/lib/leaflet/images/layers.png similarity index 100% rename from web_view_leaflet_map/static/lib/leaflet/images/layers.png rename to web_leaflet_lib/static/lib/leaflet/images/layers.png diff --git a/web_view_leaflet_map/static/lib/leaflet/images/marker-icon-2x.png b/web_leaflet_lib/static/lib/leaflet/images/marker-icon-2x.png similarity index 100% rename from web_view_leaflet_map/static/lib/leaflet/images/marker-icon-2x.png rename to web_leaflet_lib/static/lib/leaflet/images/marker-icon-2x.png diff --git a/web_view_leaflet_map/static/lib/leaflet/images/marker-icon.png b/web_leaflet_lib/static/lib/leaflet/images/marker-icon.png similarity index 100% rename from web_view_leaflet_map/static/lib/leaflet/images/marker-icon.png rename to web_leaflet_lib/static/lib/leaflet/images/marker-icon.png diff --git a/web_view_leaflet_map/static/lib/leaflet/images/marker-shadow.png b/web_leaflet_lib/static/lib/leaflet/images/marker-shadow.png similarity index 100% rename from web_view_leaflet_map/static/lib/leaflet/images/marker-shadow.png rename to web_leaflet_lib/static/lib/leaflet/images/marker-shadow.png diff --git a/web_view_leaflet_map/static/lib/leaflet/leaflet.css b/web_leaflet_lib/static/lib/leaflet/leaflet.css similarity index 100% rename from web_view_leaflet_map/static/lib/leaflet/leaflet.css rename to web_leaflet_lib/static/lib/leaflet/leaflet.css diff --git a/web_view_leaflet_map/static/lib/leaflet/leaflet.js b/web_leaflet_lib/static/lib/leaflet/leaflet.js similarity index 100% rename from web_view_leaflet_map/static/lib/leaflet/leaflet.js rename to web_leaflet_lib/static/lib/leaflet/leaflet.js diff --git a/web_view_leaflet_map/static/lib/leaflet/leaflet.js.map b/web_leaflet_lib/static/lib/leaflet/leaflet.js.map similarity index 100% rename from web_view_leaflet_map/static/lib/leaflet/leaflet.js.map rename to web_leaflet_lib/static/lib/leaflet/leaflet.js.map diff --git a/web_view_leaflet_map/README.rst b/web_view_leaflet_map/README.rst index 55b0c9cdc6..ce49125516 100644 --- a/web_view_leaflet_map/README.rst +++ b/web_view_leaflet_map/README.rst @@ -7,7 +7,7 @@ Leaflet Map View (OpenStreetMap) !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:b9e0beff8f439a6c89a4b788c6c59e63b150e687eb60845e5cd811768148f875 + !! source digest: sha256:fb5c0966ccb6058cd5db4000982a3f2910659e43db67856f3613092ae8fe3a78 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png @@ -40,28 +40,6 @@ defined. (To define latitude and longitude, refer to the Odoo module ``base_geol .. figure:: https://raw.githubusercontent.com/OCA/geospatial/16.0/web_view_leaflet_map/static/description/view_res_partner_map_2.png - -**Important Note** - -The javascript library is opensource and distributed under BSD 2 Licence. -See : https://github.com/Leaflet/Leaflet/blob/main/LICENSE -You can so use it freely. - -However, display maps requires to display layers provided by tiles servers, that -requires ressources. - -**For testing purpose** - -you can use the openStreetMap url ``https://tile.openstreetmap.org/{z}/{x}/{y}.png`` or other, listed in that page : https://wiki.openstreetmap.org/wiki/Tile_servers - -Apart from very limited testing purposes, you should not use the tiles supplied by OpenStreetMap.org itself. OpenStreetMap is a volunteer-run non-profit body and cannot supply tiles for large-scale commercial use. - -**Regular / High Usage** - -- you can contact one of the following companies : https://switch2osm.org/providers/ - -- You can also install yourself your own tiles servers. See documentation : https://switch2osm.org/serving-tiles/ - .. IMPORTANT:: This is an alpha version, the data model and design can change at any time without warning. Only for development or testing purpose, do not use in production. @@ -75,11 +53,7 @@ Apart from very limited testing purposes, you should not use the tiles supplied Configuration ============= -* Go to Settings > Technical > Parameters > System Parameters - -* Create or edit the parameter with the key ``leaflet.tile_url`` - -* As a value, set the url of the tiles server you chose. (See description) +* See configuration of the module ``web_leaflet_lib``. Development =========== @@ -182,11 +156,6 @@ Contributors * Sylvain LE GAL (https://www.twitter.com/legalsylvain) -Other credits -~~~~~~~~~~~~~ - -The module embed the Leaflet.js library. - Maintainers ~~~~~~~~~~~ diff --git a/web_view_leaflet_map/__manifest__.py b/web_view_leaflet_map/__manifest__.py index afc6f7d87a..616e0171fa 100644 --- a/web_view_leaflet_map/__manifest__.py +++ b/web_view_leaflet_map/__manifest__.py @@ -4,8 +4,7 @@ { "name": "Leaflet Map View (OpenStreetMap)", - "summary": "Integrate leaflet.js librairy with odoo" - " and add new 'leaflet_map' view, to display markers.", + "summary": "Add new 'leaflet_map' view, to display markers.", "version": "16.0.1.0.0", "development_status": "Alpha", "author": "GRAP, Odoo Community Association (OCA)", @@ -15,12 +14,7 @@ "category": "Extra Tools", "depends": [ "base_geolocalize", - ], - "data": [ - "data/ir_config_parameter.xml", - ], - "demo": [ - "demo/ir_config_parameter.xml", + "web_leaflet_lib", ], "assets": { "web.assets_backend": [ @@ -28,8 +22,6 @@ "web_view_leaflet_map/static/src/js/view/map/map_renderer.js", "web_view_leaflet_map/static/src/js/view/map/map_view.js", "web_view_leaflet_map/static/src/css/web_view_leaflet_map.css", - "/web_view_leaflet_map/static/lib/leaflet/leaflet.css", - "/web_view_leaflet_map/static/lib/leaflet/leaflet.js", ], }, "installable": True, diff --git a/web_view_leaflet_map/i18n/fr.po b/web_view_leaflet_map/i18n/fr.po index 845024e317..1093ad0a71 100644 --- a/web_view_leaflet_map/i18n/fr.po +++ b/web_view_leaflet_map/i18n/fr.po @@ -21,11 +21,6 @@ msgstr "" msgid "Action Window View" msgstr "Vue de la FenĂȘtre d'Action" -#. module: web_view_leaflet_map -#: model:ir.model,name:web_view_leaflet_map.model_ir_http -msgid "HTTP Routing" -msgstr "Routage HTTP" - #. module: web_view_leaflet_map #: model:ir.model.fields.selection,name:web_view_leaflet_map.selection__ir_actions_act_window_view__view_mode__leaflet_map #: model:ir.model.fields.selection,name:web_view_leaflet_map.selection__ir_ui_view__type__leaflet_map diff --git a/web_view_leaflet_map/i18n/it.po b/web_view_leaflet_map/i18n/it.po index dee6fe4278..c9d2f0e209 100644 --- a/web_view_leaflet_map/i18n/it.po +++ b/web_view_leaflet_map/i18n/it.po @@ -21,11 +21,6 @@ msgstr "" msgid "Action Window View" msgstr "Vista maschera azione" -#. module: web_view_leaflet_map -#: model:ir.model,name:web_view_leaflet_map.model_ir_http -msgid "HTTP Routing" -msgstr "Instradamento HTTP" - #. module: web_view_leaflet_map #: model:ir.model.fields.selection,name:web_view_leaflet_map.selection__ir_actions_act_window_view__view_mode__leaflet_map #: model:ir.model.fields.selection,name:web_view_leaflet_map.selection__ir_ui_view__type__leaflet_map diff --git a/web_view_leaflet_map/i18n/web_view_leaflet_map.pot b/web_view_leaflet_map/i18n/web_view_leaflet_map.pot index b0cc92a95f..f73b494ec2 100644 --- a/web_view_leaflet_map/i18n/web_view_leaflet_map.pot +++ b/web_view_leaflet_map/i18n/web_view_leaflet_map.pot @@ -18,11 +18,6 @@ msgstr "" msgid "Action Window View" msgstr "" -#. module: web_view_leaflet_map -#: model:ir.model,name:web_view_leaflet_map.model_ir_http -msgid "HTTP Routing" -msgstr "" - #. module: web_view_leaflet_map #: model:ir.model.fields.selection,name:web_view_leaflet_map.selection__ir_actions_act_window_view__view_mode__leaflet_map #: model:ir.model.fields.selection,name:web_view_leaflet_map.selection__ir_ui_view__type__leaflet_map diff --git a/web_view_leaflet_map/models/__init__.py b/web_view_leaflet_map/models/__init__.py index 50504bd59b..fc23e6d3f9 100644 --- a/web_view_leaflet_map/models/__init__.py +++ b/web_view_leaflet_map/models/__init__.py @@ -1,4 +1,3 @@ from . import ir_act_window_view from . import ir_ui_view -from . import ir_http from . import res_users diff --git a/web_view_leaflet_map/readme/CONFIGURE.rst b/web_view_leaflet_map/readme/CONFIGURE.rst index cf45731ceb..3dd5645dad 100644 --- a/web_view_leaflet_map/readme/CONFIGURE.rst +++ b/web_view_leaflet_map/readme/CONFIGURE.rst @@ -1,5 +1 @@ -* Go to Settings > Technical > Parameters > System Parameters - -* Create or edit the parameter with the key ``leaflet.tile_url`` - -* As a value, set the url of the tiles server you chose. (See description) +* See configuration of the module ``web_leaflet_lib``. \ No newline at end of file diff --git a/web_view_leaflet_map/readme/DESCRIPTION.rst b/web_view_leaflet_map/readme/DESCRIPTION.rst index 7be1c11ea5..365746f607 100644 --- a/web_view_leaflet_map/readme/DESCRIPTION.rst +++ b/web_view_leaflet_map/readme/DESCRIPTION.rst @@ -9,25 +9,3 @@ defined. (To define latitude and longitude, refer to the Odoo module ``base_geol .. figure:: ../static/description/view_res_partner_map_1.png .. figure:: ../static/description/view_res_partner_map_2.png - - -**Important Note** - -The javascript library is opensource and distributed under BSD 2 Licence. -See : https://github.com/Leaflet/Leaflet/blob/main/LICENSE -You can so use it freely. - -However, display maps requires to display layers provided by tiles servers, that -requires ressources. - -**For testing purpose** - -you can use the openStreetMap url ``https://tile.openstreetmap.org/{z}/{x}/{y}.png`` or other, listed in that page : https://wiki.openstreetmap.org/wiki/Tile_servers - -Apart from very limited testing purposes, you should not use the tiles supplied by OpenStreetMap.org itself. OpenStreetMap is a volunteer-run non-profit body and cannot supply tiles for large-scale commercial use. - -**Regular / High Usage** - -- you can contact one of the following companies : https://switch2osm.org/providers/ - -- You can also install yourself your own tiles servers. See documentation : https://switch2osm.org/serving-tiles/ diff --git a/web_view_leaflet_map/static/description/index.html b/web_view_leaflet_map/static/description/index.html index 595e1e917b..33b3fc5568 100644 --- a/web_view_leaflet_map/static/description/index.html +++ b/web_view_leaflet_map/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -367,7 +367,7 @@

Leaflet Map View (OpenStreetMap)

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:b9e0beff8f439a6c89a4b788c6c59e63b150e687eb60845e5cd811768148f875 +!! source digest: sha256:fb5c0966ccb6058cd5db4000982a3f2910659e43db67856f3613092ae8fe3a78 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Alpha License: AGPL-3 OCA/geospatial Translate me on Weblate Try me on Runboat

This module extends odoo views, to add a new kind of view, named leaflet_map @@ -382,20 +382,6 @@

Leaflet Map View (OpenStreetMap)

https://raw.githubusercontent.com/OCA/geospatial/16.0/web_view_leaflet_map/static/description/view_res_partner_map_2.png
-

Important Note

-

The javascript library is opensource and distributed under BSD 2 Licence. -See : https://github.com/Leaflet/Leaflet/blob/main/LICENSE -You can so use it freely.

-

However, display maps requires to display layers provided by tiles servers, that -requires ressources.

-

For testing purpose

-

you can use the openStreetMap url https://tile.openstreetmap.org/{z}/{x}/{y}.png or other, listed in that page : https://wiki.openstreetmap.org/wiki/Tile_servers

-

Apart from very limited testing purposes, you should not use the tiles supplied by OpenStreetMap.org itself. OpenStreetMap is a volunteer-run non-profit body and cannot supply tiles for large-scale commercial use.

-

Regular / High Usage

-

Important

This is an alpha version, the data model and design can change at any time without warning. @@ -412,8 +398,7 @@

Leaflet Map View (OpenStreetMap)

  • Credits
  • @@ -421,9 +406,7 @@

    Leaflet Map View (OpenStreetMap)

    Configuration

      -
    • Go to Settings > Technical > Parameters > System Parameters
    • -
    • Create or edit the parameter with the key leaflet.tile_url
    • -
    • As a value, set the url of the tiles server you chose. (See description)
    • +
    • See configuration of the module web_leaflet_lib.
    @@ -521,14 +504,12 @@

    Contributors

  • Sylvain LE GAL (https://www.twitter.com/legalsylvain)
  • -
    -

    Other credits

    -

    The module embed the Leaflet.js library.

    -
    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    -Odoo Community Association + +Odoo Community Association +

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.