1 | /* |
2 | Copyright - 2017 2023 - wwwouaiebe - Contact: https://www.ouaie.be/ |
3 | |
4 | This program is free software; |
5 | you can redistribute it and/or modify it under the terms of the |
6 | GNU General Public License as published by the Free Software Foundation; |
7 | either version 3 of the License, or any later version. |
8 | |
9 | This program is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | GNU General Public License for more details. |
13 | |
14 | You should have received a copy of the GNU General Public License |
15 | along with this program; if not, write to the Free Software |
16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 | */ |
18 | /* |
19 | Changes: |
20 | - v4.0.0: |
21 | - created from v3.6.0 |
22 | Doc reviewed 202208 |
23 | */ |
24 | |
25 | /* ------------------------------------------------------------------------------------------------------------------------- */ |
26 | /** |
27 | A simple container with all the Leaflet objects for a note created by the MapEditorViewer.addNote ( ) |
28 | */ |
29 | /* ------------------------------------------------------------------------------------------------------------------------- */ |
30 | |
31 | class NoteLeafletObjects { |
32 | |
33 | /** |
34 | The marker of the note (= a L.Marker object) |
35 | @type {LeafletObject} |
36 | */ |
37 | |
38 | #marker; |
39 | |
40 | /** |
41 | The polyline of the note (= a L.Polyline object) |
42 | @type {LeafletObject} |
43 | */ |
44 | |
45 | #polyline; |
46 | |
47 | /** |
48 | The bullet of the note (= a L.Marker object) |
49 | @type {LeafletObject} |
50 | */ |
51 | |
52 | #bullet; |
53 | |
54 | /** |
55 | The constructor |
56 | @param {LeafletObject} marker The marker of the note |
57 | @param {LeafletObject} polyline The polyline of the note |
58 | @param {LeafletObject} bullet The bullet of the note |
59 | */ |
60 | |
61 | constructor ( marker, polyline, bullet ) { |
62 | Object.freeze ( this ); |
63 | this.#marker = marker; |
64 | this.#polyline = polyline; |
65 | this.#bullet = bullet; |
66 | } |
67 | |
68 | /** |
69 | The marker of the note (= a L.Marker object) |
70 | @type {LeafletObject} |
71 | */ |
72 | |
73 | get marker ( ) { return this.#marker; } |
74 | |
75 | /** |
76 | The polyline of the note (= a L.Polyline object) |
77 | @type {LeafletObject} |
78 | */ |
79 | |
80 | get polyline ( ) { return this.#polyline; } |
81 | |
82 | /** |
83 | The bullet of the note (= a L.Marker object) |
84 | @type {LeafletObject} |
85 | */ |
86 | |
87 | get bullet ( ) { return this.#bullet; } |
88 | |
89 | } |
90 | |
91 | export default NoteLeafletObjects; |
92 | |
93 | /* --- End of file --------------------------------------------------------------------------------------------------------- */ |
94 |