odoo-addon-web-view-leaflet-map 18.0.1.0.0.3__py3-none-any.whl → 18.0.1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,7 @@
1
+ .. image:: https://odoo-community.org/readme-banner-image
2
+ :target: https://odoo-community.org/get-involved?utm_source=readme
3
+ :alt: Odoo Community Association
4
+
1
5
  ================================
2
6
  Leaflet Map View (OpenStreetMap)
3
7
  ================================
@@ -7,13 +11,13 @@ Leaflet Map View (OpenStreetMap)
7
11
  !! This file is generated by oca-gen-addon-readme !!
8
12
  !! changes will be overwritten. !!
9
13
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:52ae60ed2032c73f0ba6fc8ca70e2a2fc73bb12745aeeda793042efb1175c1b9
14
+ !! source digest: sha256:c37e50e22d31d4d0b0f78e0c83ab7bdd875299727d4b10e6183b66499a1fed47
11
15
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
16
 
13
17
  .. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
14
18
  :target: https://odoo-community.org/page/development-status
15
19
  :alt: Alpha
16
- .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
20
+ .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
17
21
  :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18
22
  :alt: License: AGPL-3
19
23
  .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fgeospatial-lightgray.png?logo=github
@@ -39,12 +43,20 @@ displays your contact in a map, if latitude and longitude are defined.
39
43
  (To define latitude and longitude, refer to the Odoo module
40
44
  ``base_geolocalize``)
41
45
 
46
+ A marker will be displayed for each item that has a localization.
47
+
42
48
  |image1|
43
49
 
50
+ If user zooms out, the markers will overlap, which won't be very
51
+ visible.
52
+
53
+ In that case, nearby markers are grouped together, thanks to
54
+ ``Leaflet.markercluster`` plugin.
55
+
44
56
  |image2|
45
57
 
46
- .. |image1| image:: https://raw.githubusercontent.com/OCA/geospatial/18.0/web_view_leaflet_map/static/description/view_res_partner_map_1.png
47
- .. |image2| image:: https://raw.githubusercontent.com/OCA/geospatial/18.0/web_view_leaflet_map/static/description/view_res_partner_map_2.png
58
+ .. |image1| image:: https://raw.githubusercontent.com/OCA/geospatial/18.0/web_view_leaflet_map/static/description/view_res_partner_map_precise.png
59
+ .. |image2| image:: https://raw.githubusercontent.com/OCA/geospatial/18.0/web_view_leaflet_map/static/description/view_res_partner_map_large.png
48
60
 
49
61
  .. IMPORTANT::
50
62
  This is an alpha version, the data model and design can change at any time without warning.
@@ -5,7 +5,7 @@
5
5
  {
6
6
  "name": "Leaflet Map View (OpenStreetMap)",
7
7
  "summary": "Add new 'leaflet_map' view, to display markers.",
8
- "version": "18.0.1.0.0",
8
+ "version": "18.0.1.1.0",
9
9
  "development_status": "Alpha",
10
10
  "author": "GRAP, Odoo Community Association (OCA)",
11
11
  "maintainers": ["legalsylvain"],
@@ -8,6 +8,16 @@ in the same OCA repository that displays your contact in a map, if
8
8
  latitude and longitude are defined. (To define latitude and longitude,
9
9
  refer to the Odoo module `base_geolocalize`)
10
10
 
11
- ![](../static/description/view_res_partner_map_1.png)
11
+ A marker will be displayed for each item that has a localization.
12
+
13
+ ![](../static/description/view_res_partner_map_precise.png)
14
+
15
+ If user zooms out, the markers will overlap, which won't be very visible.
16
+
17
+ In that case, nearby markers are grouped together, thanks to
18
+ `Leaflet.markercluster` plugin.
19
+
20
+ ![](../static/description/view_res_partner_map_large.png)
21
+
22
+
12
23
 
13
- ![](../static/description/view_res_partner_map_2.png)
@@ -2,18 +2,19 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
- <meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
6
- <title>Leaflet Map View (OpenStreetMap)</title>
5
+ <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6
+ <title>README.rst</title>
7
7
  <style type="text/css">
8
8
 
9
9
  /*
10
10
  :Author: David Goodger (goodger@python.org)
11
- :Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
11
+ :Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
12
12
  :Copyright: This stylesheet has been placed in the public domain.
13
13
 
14
14
  Default cascading style sheet for the HTML output of Docutils.
15
+ Despite the name, some widely supported CSS2 features are used.
15
16
 
16
- See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
17
+ See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
17
18
  customize this style sheet.
18
19
  */
19
20
 
@@ -274,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
274
275
  margin-left: 2em ;
275
276
  margin-right: 2em }
276
277
 
277
- pre.code .ln { color: grey; } /* line numbers */
278
+ pre.code .ln { color: gray; } /* line numbers */
278
279
  pre.code, code { background-color: #eeeeee }
279
280
  pre.code .comment, code .comment { color: #5C6576 }
280
281
  pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -300,7 +301,7 @@ span.option {
300
301
  span.pre {
301
302
  white-space: pre }
302
303
 
303
- span.problematic {
304
+ span.problematic, pre.problematic {
304
305
  color: red }
305
306
 
306
307
  span.section-subtitle {
@@ -359,16 +360,21 @@ ul.auto-toc {
359
360
  </style>
360
361
  </head>
361
362
  <body>
362
- <div class="document" id="leaflet-map-view-openstreetmap">
363
- <h1 class="title">Leaflet Map View (OpenStreetMap)</h1>
363
+ <div class="document">
364
364
 
365
+
366
+ <a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367
+ <img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368
+ </a>
369
+ <div class="section" id="leaflet-map-view-openstreetmap">
370
+ <h1>Leaflet Map View (OpenStreetMap)</h1>
365
371
  <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
366
372
  !! This file is generated by oca-gen-addon-readme !!
367
373
  !! changes will be overwritten. !!
368
374
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369
- !! source digest: sha256:52ae60ed2032c73f0ba6fc8ca70e2a2fc73bb12745aeeda793042efb1175c1b9
375
+ !! source digest: sha256:c37e50e22d31d4d0b0f78e0c83ab7bdd875299727d4b10e6183b66499a1fed47
370
376
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371
- <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/geospatial/tree/18.0/web_view_leaflet_map"><img alt="OCA/geospatial" src="https://img.shields.io/badge/github-OCA%2Fgeospatial-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/geospatial-18-0/geospatial-18-0-web_view_leaflet_map"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runboat.odoo-community.org/builds?repo=OCA/geospatial&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377
+ <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/geospatial/tree/18.0/web_view_leaflet_map"><img alt="OCA/geospatial" src="https://img.shields.io/badge/github-OCA%2Fgeospatial-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/geospatial-18-0/geospatial-18-0-web_view_leaflet_map"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/geospatial&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372
378
  <p>This module extends odoo views, to add a new kind of view, named
373
379
  <tt class="docutils literal">leaflet_map</tt> that is using the Leaflet javascript library to use
374
380
  maps. (<a class="reference external" href="https://leafletjs.com/">https://leafletjs.com/</a>) This library is for exemple, used in the
@@ -378,8 +384,13 @@ OpenStreetMap project. (<a class="reference external" href="https://www.openstre
378
384
  displays your contact in a map, if latitude and longitude are defined.
379
385
  (To define latitude and longitude, refer to the Odoo module
380
386
  <tt class="docutils literal">base_geolocalize</tt>)</p>
381
- <p><img alt="image1" src="https://raw.githubusercontent.com/OCA/geospatial/18.0/web_view_leaflet_map/static/description/view_res_partner_map_1.png" /></p>
382
- <p><img alt="image2" src="https://raw.githubusercontent.com/OCA/geospatial/18.0/web_view_leaflet_map/static/description/view_res_partner_map_2.png" /></p>
387
+ <p>A marker will be displayed for each item that has a localization.</p>
388
+ <p><img alt="image1" src="https://raw.githubusercontent.com/OCA/geospatial/18.0/web_view_leaflet_map/static/description/view_res_partner_map_precise.png" /></p>
389
+ <p>If user zooms out, the markers will overlap, which won’t be very
390
+ visible.</p>
391
+ <p>In that case, nearby markers are grouped together, thanks to
392
+ <tt class="docutils literal">Leaflet.markercluster</tt> plugin.</p>
393
+ <p><img alt="image2" src="https://raw.githubusercontent.com/OCA/geospatial/18.0/web_view_leaflet_map/static/description/view_res_partner_map_large.png" /></p>
383
394
  <div class="admonition important">
384
395
  <p class="first admonition-title">Important</p>
385
396
  <p class="last">This is an alpha version, the data model and design can change at any time without warning.
@@ -389,46 +400,46 @@ Only for development or testing purpose, do not use in production.
389
400
  <p><strong>Table of contents</strong></p>
390
401
  <div class="contents local topic" id="contents">
391
402
  <ul class="simple">
392
- <li><a class="reference internal" href="#configuration" id="id1">Configuration</a></li>
393
- <li><a class="reference internal" href="#development" id="id2">Development</a></li>
394
- <li><a class="reference internal" href="#known-issues-roadmap" id="id3">Known issues / Roadmap</a></li>
395
- <li><a class="reference internal" href="#bug-tracker" id="id4">Bug Tracker</a></li>
396
- <li><a class="reference internal" href="#credits" id="id5">Credits</a><ul>
397
- <li><a class="reference internal" href="#authors" id="id6">Authors</a></li>
398
- <li><a class="reference internal" href="#contributors" id="id7">Contributors</a></li>
399
- <li><a class="reference internal" href="#maintainers" id="id8">Maintainers</a></li>
403
+ <li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
404
+ <li><a class="reference internal" href="#development" id="toc-entry-2">Development</a></li>
405
+ <li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-3">Known issues / Roadmap</a></li>
406
+ <li><a class="reference internal" href="#bug-tracker" id="toc-entry-4">Bug Tracker</a></li>
407
+ <li><a class="reference internal" href="#credits" id="toc-entry-5">Credits</a><ul>
408
+ <li><a class="reference internal" href="#authors" id="toc-entry-6">Authors</a></li>
409
+ <li><a class="reference internal" href="#contributors" id="toc-entry-7">Contributors</a></li>
410
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-8">Maintainers</a></li>
400
411
  </ul>
401
412
  </li>
402
413
  </ul>
403
414
  </div>
404
415
  <div class="section" id="configuration">
405
- <h1><a class="toc-backref" href="#id1">Configuration</a></h1>
416
+ <h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
406
417
  <ul class="simple">
407
418
  <li>See configuration of the module <tt class="docutils literal">web_leaflet_lib</tt>.</li>
408
419
  </ul>
409
420
  </div>
410
421
  <div class="section" id="development">
411
- <h1><a class="toc-backref" href="#id2">Development</a></h1>
422
+ <h2><a class="toc-backref" href="#toc-entry-2">Development</a></h2>
412
423
  <p>Create a new view :</p>
413
424
  <pre class="code xml literal-block">
414
- <span class="nt">&lt;record</span> <span class="na">id=</span><span class="s">&quot;view_my_model_map&quot;</span> <span class="na">model=</span><span class="s">&quot;ir.ui.view&quot;</span><span class="nt">&gt;</span>
415
- <span class="nt">&lt;field</span> <span class="na">name=</span><span class="s">&quot;model&quot;</span><span class="nt">&gt;</span>my.model<span class="nt">&lt;/field&gt;</span>
416
- <span class="nt">&lt;field</span> <span class="na">name=</span><span class="s">&quot;arch&quot;</span> <span class="na">type=</span><span class="s">&quot;xml&quot;</span><span class="nt">&gt;</span>
417
- <span class="nt">&lt;leaflet_map</span>
418
- <span class="na">field_latitude=</span><span class="s">&quot;FIELD_LATITUDE&quot;</span>
419
- <span class="na">field_longitude=</span><span class="s">&quot;FIELD_LONGITUDE&quot;</span>
420
- <span class="na">field_title=</span><span class="s">&quot;FIELD_TITLE&quot;</span>
421
- <span class="na">field_address=</span><span class="s">&quot;FIELD_ADDRESS&quot;</span>
422
- <span class="na">field_marker_icon_image=</span><span class="s">&quot;FIELD_MARKER_ICON_IMAGE&quot;</span>
423
- <span class="nt">&gt;</span>
424
- <span class="nt">&lt;field</span> <span class="na">name=</span><span class="s">&quot;__last_update&quot;</span><span class="nt">/&gt;</span>
425
- <span class="nt">&lt;field</span> <span class="na">name=</span><span class="s">&quot;FIELD_LATITUDE&quot;</span><span class="nt">/&gt;</span>
426
- <span class="nt">&lt;field</span> <span class="na">name=</span><span class="s">&quot;FIELD_LONGITUDE&quot;</span><span class="nt">/&gt;</span>
427
- <span class="nt">&lt;field</span> <span class="na">name=</span><span class="s">&quot;FIELD_TITLE&quot;</span><span class="nt">/&gt;</span>
428
- <span class="nt">&lt;field</span> <span class="na">name=</span><span class="s">&quot;FIELD_ADDRESS&quot;</span><span class="nt">/&gt;</span>
429
- <span class="nt">&lt;/leaflet_map&gt;</span>
430
- <span class="nt">&lt;/field&gt;</span>
431
- <span class="nt">&lt;/record&gt;</span>
425
+ <span class="nt">&lt;record</span><span class="w"> </span><span class="na">id=</span><span class="s">&quot;view_my_model_map&quot;</span><span class="w"> </span><span class="na">model=</span><span class="s">&quot;ir.ui.view&quot;</span><span class="nt">&gt;</span><span class="w">
426
+ </span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;model&quot;</span><span class="nt">&gt;</span>my.model<span class="nt">&lt;/field&gt;</span><span class="w">
427
+ </span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;arch&quot;</span><span class="w"> </span><span class="na">type=</span><span class="s">&quot;xml&quot;</span><span class="nt">&gt;</span><span class="w">
428
+ </span><span class="nt">&lt;leaflet_map</span><span class="w">
429
+ </span><span class="na">field_latitude=</span><span class="s">&quot;FIELD_LATITUDE&quot;</span><span class="w">
430
+ </span><span class="na">field_longitude=</span><span class="s">&quot;FIELD_LONGITUDE&quot;</span><span class="w">
431
+ </span><span class="na">field_title=</span><span class="s">&quot;FIELD_TITLE&quot;</span><span class="w">
432
+ </span><span class="na">field_address=</span><span class="s">&quot;FIELD_ADDRESS&quot;</span><span class="w">
433
+ </span><span class="na">field_marker_icon_image=</span><span class="s">&quot;FIELD_MARKER_ICON_IMAGE&quot;</span><span class="w">
434
+ </span><span class="nt">&gt;</span><span class="w">
435
+ </span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;__last_update&quot;</span><span class="nt">/&gt;</span><span class="w">
436
+ </span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;FIELD_LATITUDE&quot;</span><span class="nt">/&gt;</span><span class="w">
437
+ </span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;FIELD_LONGITUDE&quot;</span><span class="nt">/&gt;</span><span class="w">
438
+ </span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;FIELD_TITLE&quot;</span><span class="nt">/&gt;</span><span class="w">
439
+ </span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;FIELD_ADDRESS&quot;</span><span class="nt">/&gt;</span><span class="w">
440
+ </span><span class="nt">&lt;/leaflet_map&gt;</span><span class="w">
441
+ </span><span class="nt">&lt;/field&gt;</span><span class="w">
442
+ </span><span class="nt">&lt;/record&gt;</span>
432
443
  </pre>
433
444
  <ol class="arabic simple">
434
445
  <li>FIELD_LATITUDE and FIELD_LONGITUDE are the name of the fields that
@@ -451,9 +462,9 @@ defined)</li>
451
462
  <li>Create or update an action for the model</li>
452
463
  </ul>
453
464
  <pre class="code xml literal-block">
454
- <span class="nt">&lt;record</span> <span class="na">id=</span><span class="s">&quot;my_module.action_my_model&quot;</span> <span class="na">model=</span><span class="s">&quot;ir.actions.act_window&quot;</span><span class="nt">&gt;</span>
455
- <span class="nt">&lt;field</span> <span class="na">name=</span><span class="s">&quot;view_mode&quot;</span><span class="nt">&gt;</span>tree,form,leaflet_map<span class="nt">&lt;/field&gt;</span>
456
- <span class="nt">&lt;/record&gt;</span>
465
+ <span class="nt">&lt;record</span><span class="w"> </span><span class="na">id=</span><span class="s">&quot;my_module.action_my_model&quot;</span><span class="w"> </span><span class="na">model=</span><span class="s">&quot;ir.actions.act_window&quot;</span><span class="nt">&gt;</span><span class="w">
466
+ </span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;view_mode&quot;</span><span class="nt">&gt;</span>tree,form,leaflet_map<span class="nt">&lt;/field&gt;</span><span class="w">
467
+ </span><span class="nt">&lt;/record&gt;</span>
457
468
  </pre>
458
469
  <p><strong>Default position in the map</strong></p>
459
470
  <p>By default, the position of the map is defined by the user, in the
@@ -462,7 +473,7 @@ the current company, if defined. you can overload this function
462
473
  globally, or per model.</p>
463
474
  </div>
464
475
  <div class="section" id="known-issues-roadmap">
465
- <h1><a class="toc-backref" href="#id3">Known issues / Roadmap</a></h1>
476
+ <h2><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h2>
466
477
  <ul class="simple">
467
478
  <li>For the time being, at the start of the map loading, the call of
468
479
  <tt class="docutils literal">invalidateSize()</tt> is required. We should investigate why and try to
@@ -475,7 +486,7 @@ options : <a class="reference external" href="https://leafletjs.com/reference.ht
475
486
  </ul>
476
487
  </div>
477
488
  <div class="section" id="bug-tracker">
478
- <h1><a class="toc-backref" href="#id4">Bug Tracker</a></h1>
489
+ <h2><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h2>
479
490
  <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/geospatial/issues">GitHub Issues</a>.
480
491
  In case of trouble, please check there if your issue has already been reported.
481
492
  If you spotted it first, help us to smash it by providing a detailed and welcomed
@@ -483,32 +494,35 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
483
494
  <p>Do not contact contributors directly about support or help with technical issues.</p>
484
495
  </div>
485
496
  <div class="section" id="credits">
486
- <h1><a class="toc-backref" href="#id5">Credits</a></h1>
497
+ <h2><a class="toc-backref" href="#toc-entry-5">Credits</a></h2>
487
498
  <div class="section" id="authors">
488
- <h2><a class="toc-backref" href="#id6">Authors</a></h2>
499
+ <h3><a class="toc-backref" href="#toc-entry-6">Authors</a></h3>
489
500
  <ul class="simple">
490
501
  <li>GRAP</li>
491
502
  </ul>
492
503
  </div>
493
504
  <div class="section" id="contributors">
494
- <h2><a class="toc-backref" href="#id7">Contributors</a></h2>
505
+ <h3><a class="toc-backref" href="#toc-entry-7">Contributors</a></h3>
495
506
  <ul class="simple">
496
507
  <li>Sylvain LE GAL (<a class="reference external" href="https://www.twitter.com/legalsylvain">https://www.twitter.com/legalsylvain</a>)</li>
497
508
  </ul>
498
509
  </div>
499
510
  <div class="section" id="maintainers">
500
- <h2><a class="toc-backref" href="#id8">Maintainers</a></h2>
511
+ <h3><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h3>
501
512
  <p>This module is maintained by the OCA.</p>
502
- <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
513
+ <a class="reference external image-reference" href="https://odoo-community.org">
514
+ <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
515
+ </a>
503
516
  <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
504
517
  mission is to support the collaborative development of Odoo features and
505
518
  promote its widespread use.</p>
506
519
  <p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
507
- <p><a class="reference external" href="https://github.com/legalsylvain"><img alt="legalsylvain" src="https://github.com/legalsylvain.png?size=40px" /></a></p>
520
+ <p><a class="reference external image-reference" href="https://github.com/legalsylvain"><img alt="legalsylvain" src="https://github.com/legalsylvain.png?size=40px" /></a></p>
508
521
  <p>This module is part of the <a class="reference external" href="https://github.com/OCA/geospatial/tree/18.0/web_view_leaflet_map">OCA/geospatial</a> project on GitHub.</p>
509
522
  <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
510
523
  </div>
511
524
  </div>
512
525
  </div>
526
+ </div>
513
527
  </body>
514
528
  </html>
@@ -40,7 +40,7 @@ export class MapRenderer extends Component {
40
40
  parseInt(archAttrs.marker_popup_anchor_y?.value, 10) || -32;
41
41
 
42
42
  this.leafletMap = null;
43
- this.leafletFeatureGroup = null;
43
+ this.mainLayer = null;
44
44
 
45
45
  onWillStart(async () => {
46
46
  await this.initDefaultPosition();
@@ -149,20 +149,24 @@ export class MapRenderer extends Component {
149
149
  return;
150
150
  }
151
151
 
152
- if (this.leafletFeatureGroup) {
153
- this.leafletMap.removeLayer(this.leafletFeatureGroup);
152
+ if (this.mainLayer) {
153
+ this.leafletMap.removeLayer(this.mainLayer);
154
154
  }
155
155
 
156
- this.leafletFeatureGroup = L.featureGroup().addTo(this.leafletMap);
157
-
156
+ this.mainLayer = L.markerClusterGroup();
158
157
  for (const record of this.records) {
159
158
  const marker = this.prepareMarker(record);
160
159
  if (marker) {
161
- marker.addTo(this.leafletFeatureGroup);
160
+ this.mainLayer.addLayer(marker);
162
161
  }
163
162
  }
163
+ const bounds = this.mainLayer.getBounds();
164
+ if (bounds.isValid()) {
165
+ // Adapt the map's position based on the map's points
166
+ this.leafletMap.fitBounds(bounds.pad(0.1));
167
+ }
164
168
 
165
- this.leafletMap.fitBounds(this.leafletFeatureGroup.getBounds().pad(0.1));
169
+ this.leafletMap.addLayer(this.mainLayer);
166
170
  }
167
171
 
168
172
  /**
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-web_view_leaflet_map
3
- Version: 18.0.1.0.0.3
3
+ Version: 18.0.1.1.0
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: odoo-addon-web_leaflet_lib==18.0.*
6
6
  Requires-Dist: odoo==18.0.*
@@ -16,6 +16,10 @@ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
16
16
  Classifier: Development Status :: 3 - Alpha
17
17
  Description-Content-Type: text/x-rst
18
18
 
19
+ .. image:: https://odoo-community.org/readme-banner-image
20
+ :target: https://odoo-community.org/get-involved?utm_source=readme
21
+ :alt: Odoo Community Association
22
+
19
23
  ================================
20
24
  Leaflet Map View (OpenStreetMap)
21
25
  ================================
@@ -25,13 +29,13 @@ Leaflet Map View (OpenStreetMap)
25
29
  !! This file is generated by oca-gen-addon-readme !!
26
30
  !! changes will be overwritten. !!
27
31
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28
- !! source digest: sha256:52ae60ed2032c73f0ba6fc8ca70e2a2fc73bb12745aeeda793042efb1175c1b9
32
+ !! source digest: sha256:c37e50e22d31d4d0b0f78e0c83ab7bdd875299727d4b10e6183b66499a1fed47
29
33
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30
34
 
31
35
  .. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
32
36
  :target: https://odoo-community.org/page/development-status
33
37
  :alt: Alpha
34
- .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
38
+ .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
35
39
  :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
36
40
  :alt: License: AGPL-3
37
41
  .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fgeospatial-lightgray.png?logo=github
@@ -57,12 +61,20 @@ displays your contact in a map, if latitude and longitude are defined.
57
61
  (To define latitude and longitude, refer to the Odoo module
58
62
  ``base_geolocalize``)
59
63
 
64
+ A marker will be displayed for each item that has a localization.
65
+
60
66
  |image1|
61
67
 
68
+ If user zooms out, the markers will overlap, which won't be very
69
+ visible.
70
+
71
+ In that case, nearby markers are grouped together, thanks to
72
+ ``Leaflet.markercluster`` plugin.
73
+
62
74
  |image2|
63
75
 
64
- .. |image1| image:: https://raw.githubusercontent.com/OCA/geospatial/18.0/web_view_leaflet_map/static/description/view_res_partner_map_1.png
65
- .. |image2| image:: https://raw.githubusercontent.com/OCA/geospatial/18.0/web_view_leaflet_map/static/description/view_res_partner_map_2.png
76
+ .. |image1| image:: https://raw.githubusercontent.com/OCA/geospatial/18.0/web_view_leaflet_map/static/description/view_res_partner_map_precise.png
77
+ .. |image2| image:: https://raw.githubusercontent.com/OCA/geospatial/18.0/web_view_leaflet_map/static/description/view_res_partner_map_large.png
66
78
 
67
79
  .. IMPORTANT::
68
80
  This is an alpha version, the data model and design can change at any time without warning.
@@ -1,6 +1,6 @@
1
- odoo/addons/web_view_leaflet_map/README.rst,sha256=qQgi_29jf5QVJRk3nRgYv9ntRD5-MZuUhhqaJL3KGN8,6867
1
+ odoo/addons/web_view_leaflet_map/README.rst,sha256=2qvGz2TxRXmEGibIkH-e-er-nrr3cHvPZkEHAk8WQAc,7280
2
2
  odoo/addons/web_view_leaflet_map/__init__.py,sha256=lHbcD_3Jhk02gKyANjQ1Bif8uknO8qLtRSK4lJNPeeQ,55
3
- odoo/addons/web_view_leaflet_map/__manifest__.py,sha256=PX8hMRBFCuHVYI9lOzPV3gSA4yIZJVbSOQFkLXOqz-Y,1052
3
+ odoo/addons/web_view_leaflet_map/__manifest__.py,sha256=I0wCHWQFxrtSxr3m2AooerW3rT_0sA7y_pm6y16UFBo,1052
4
4
  odoo/addons/web_view_leaflet_map/hooks.py,sha256=VWhMUWedPCg8oZxqJCladNBaU9NvJMBJI6BlYKXNcEM,685
5
5
  odoo/addons/web_view_leaflet_map/i18n/fr.po,sha256=xSXoIxogfegwOztumHeW5R4xxUooxHsDPCcoqQEgm0k,2102
6
6
  odoo/addons/web_view_leaflet_map/i18n/it.po,sha256=RjAJVMbLRt2eJZ-YG2gb_yGGEfB9idHfZZt7Y_ehU0Y,1761
@@ -11,16 +11,17 @@ odoo/addons/web_view_leaflet_map/models/ir_ui_view.py,sha256=6K_zmkC44ymIDNycqo2
11
11
  odoo/addons/web_view_leaflet_map/models/res_users.py,sha256=SmYcwiVXifiT8pDlb1pdAYnlvnodZ8oOrJHr6GQlle4,545
12
12
  odoo/addons/web_view_leaflet_map/readme/CONFIGURE.md,sha256=X0jv_nRhCoSaQ3ZqwOqr8g03pGHv-elXfhX6gIN4ilg,53
13
13
  odoo/addons/web_view_leaflet_map/readme/CONTRIBUTORS.md,sha256=MBsB-NNU4QMO7gTa_ZRympiiIQwyMPYqq4M3-PbwbHM,58
14
- odoo/addons/web_view_leaflet_map/readme/DESCRIPTION.md,sha256=Ubg66tabR4lkMIhbfKTQqyl33dOHRLXlIgYe1ReZv_E,629
14
+ odoo/addons/web_view_leaflet_map/readme/DESCRIPTION.md,sha256=D2_dBJqIgPwUWBL-JnqAXh8LezKNEup1nPB9v10-RBo,878
15
15
  odoo/addons/web_view_leaflet_map/readme/DEVELOP.md,sha256=kiVt9qT6SC6Uh9fY0qqSpaI9HSeC67Ppi0b7O7iGPfg,1968
16
16
  odoo/addons/web_view_leaflet_map/readme/ROADMAP.md,sha256=PuCMzJS_OKS0w9YBe1r4k3sIJnuvhcrS7qiuUwzwBzk,499
17
17
  odoo/addons/web_view_leaflet_map/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
18
- odoo/addons/web_view_leaflet_map/static/description/index.html,sha256=Jc3I2a281fa5S5Vh0_Q5UC4wfeoj_cTNyLNLuYf6FhU,19285
19
- odoo/addons/web_view_leaflet_map/static/description/res_partner_map.png,sha256=vyOw2l7n7k4-jYgTT-r31vA4h8kSnjMo0WW0iNEzRi4,390800
20
- odoo/addons/web_view_leaflet_map/static/src/components/map-component/map_view.esm.js,sha256=LjmqpLMgkiDOW5y3Y9nD5m6YKySBLPAcQ6mTMQwWRX0,10459
18
+ odoo/addons/web_view_leaflet_map/static/description/index.html,sha256=5X8Wn_h-6Qaxc7LDgJS_Yo5LEiVcI6ETiU_fclyHOmI,20840
19
+ odoo/addons/web_view_leaflet_map/static/description/res_partner_large.png,sha256=ykj5NK-6ofbXgCzXUmGZfobtgVok8DnElDonvBD2e-o,85248
20
+ odoo/addons/web_view_leaflet_map/static/description/res_partner_precise.png,sha256=4A1yh0S4NpUWTw6VIzI4zC9JcWomc2TO9_9FpsSkGhs,493740
21
+ odoo/addons/web_view_leaflet_map/static/src/components/map-component/map_view.esm.js,sha256=AzUK9DCne_fC9DO4hyPQNsO9yQVDLI7CT_Gl-SGyUiU,10577
21
22
  odoo/addons/web_view_leaflet_map/static/src/components/map-component/map_view.xml,sha256=bVHRZOFSKUDKBybx0BzZRgwgJh7DvlKtsMI2fNhrqrc,586
22
23
  odoo/addons/web_view_leaflet_map/static/src/components/map-component/web_view_leaflet_map.css,sha256=Tp3SfDNuSPCN32sh_HlSmiF3AYWlvxlzSp8u3NCAHiA,1527
23
- odoo_addon_web_view_leaflet_map-18.0.1.0.0.3.dist-info/METADATA,sha256=YOFX7HNhXgVfklBDSzUoQfPvgF0x_flwFDaZRsAWxek,7526
24
- odoo_addon_web_view_leaflet_map-18.0.1.0.0.3.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
25
- odoo_addon_web_view_leaflet_map-18.0.1.0.0.3.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
26
- odoo_addon_web_view_leaflet_map-18.0.1.0.0.3.dist-info/RECORD,,
24
+ odoo_addon_web_view_leaflet_map-18.0.1.1.0.dist-info/METADATA,sha256=eXr5q-l7T4l6nsrvrSoXaZzRW0MlgNkc0HZ1ihmm89Y,7937
25
+ odoo_addon_web_view_leaflet_map-18.0.1.1.0.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
26
+ odoo_addon_web_view_leaflet_map-18.0.1.1.0.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
27
+ odoo_addon_web_view_leaflet_map-18.0.1.1.0.dist-info/RECORD,,