chore: suppression de la v1 PHP (disponible dans l'historique), licence racine MIT, README v2
This commit is contained in:
@@ -1,661 +1,28 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 ORGANISATION KA INTERNATIONALE (OKI) & contributeurs JWE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
Note : les photographies affichées par l'application restent la propriété de
|
||||
leurs auteurs respectifs et sont distribuées sous leurs licences Wikimedia
|
||||
Commons (voir content/credits.md). Les extraits d'articles Wikipédia sont
|
||||
sous licence CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/deed.fr).
|
||||
|
||||
@@ -1,24 +1,10 @@
|
||||
# JWE
|
||||
|
||||
> **JWE v2 — refonte GeoGuessr souverain** : jeu de géolocalisation (photo unique → placer la commune sur une carte MapLibre) centré sur la Guadeloupe, la Martinique, la Guyane et La Réunion, avec une phase éducative Wikipedia/Wikidata après chaque manche.
|
||||
>
|
||||
> - **Application** : [`app/`](app/) — SvelteKit 2 + Svelte 5 + MapLibre GL JS, PWA, bilingue français/créole, licence MIT.
|
||||
> - **Documentation** : [`docs/architecture.md`](docs/architecture.md) (décisions), [`docs/deploiement.md`](docs/deploiement.md) (auto-hébergement), [`docs/contribution.md`](docs/contribution.md) (ajouter un lieu).
|
||||
> - **Démarrage rapide** : `cd app && npm ci && npm run dev` (Node ≥ 20 ; la version historique PHP ci-dessous reste fonctionnelle telle quelle).
|
||||
|
||||
---
|
||||
|
||||
## Version historique (PHP)
|
||||
|
||||
<p align="center">
|
||||
Ce projet cartographique est une application Web simple qui vous permet de tester vos connaissances des communes ou des pays proposés à l'aide de cartes interactives.
|
||||
JWE est un jeu de géolocalisation souverain, dans l'esprit de GeoGuessr, centré sur 4 régions : <strong>Guadeloupe, Martinique, Guyane, La Réunion</strong>. Le joueur voit une photo unique d'un lieu et place un marqueur sur une carte pour deviner la commune — puis découvre une fiche éducative Wikipédia/Wikidata… ou un appel à contribution quand le lieu n'y est pas documenté (<em>Pwen blindé</em>).
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
Il ne nécessite qu'un serveur Web local pour fonctionner, tel que Nginx, Apache, ou un serveur PHP intégré.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://liberapay.com/OKI/donate/">
|
||||
<img src="https://img.shields.io/liberapay/receives/OKI.svg?logo=liberapay">
|
||||
<img src="https://img.shields.io/liberapay/patrons/OKI.svg?logo=liberapay">
|
||||
@@ -26,55 +12,39 @@ Il ne nécessite qu'un serveur Web local pour fonctionner, tel que Nginx, Apache
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://codeberg.org/OKI/jwe/raw/commit/166b356d21e4b3271afd3be111eae57e6bee7a95/972.gif" />
|
||||
</p>
|
||||
|
||||
- **Souverain** : zéro Google, zéro Mapbox. MapLibre + tiles libres, Wikipédia/Wikidata, auto-hébergeable sur un petit VPS.
|
||||
- **Éthique** : pas de comptes, pas de leaderboard, pas de mécanique dopaminergique.
|
||||
- **Bilingue** : français / créole.
|
||||
- **Stack** : Svelte 5 + SvelteKit 2, MapLibre GL JS, Node ≥ 20, licence MIT.
|
||||
|
||||
## Utilisation
|
||||
|
||||
1. **Clonage du dépôt**
|
||||
|
||||
Clonez ce dépôt sur votre ordinateur en utilisant la commande suivante :
|
||||
|
||||
```bash
|
||||
git clone https://codeberg.org/OKI/jwe.git
|
||||
```
|
||||
|
||||
2. **Configuration du Serveur Web Local**
|
||||
|
||||
Placez le répertoire cloné dans le répertoire racine de votre serveur Web local. Vous pouvez également exécuter la commande suivante depuis le répertoire du projet :
|
||||
|
||||
```bash
|
||||
php -S 127.0.0.1:8000
|
||||
git clone https://labola.o-k-i.net/ORGANISATION-KA-INTERNATIONALE/JWE.git
|
||||
cd JWE/app
|
||||
npm ci
|
||||
npm run dev # développement
|
||||
npm run build && node build # production (adapter-node)
|
||||
```
|
||||
|
||||
3. **Accès à l'Application**
|
||||
## Documentation
|
||||
|
||||
Accédez à l'application via votre navigateur Web en utilisant l'adresse `http://127.0.0.1:8000`.
|
||||
- [`docs/architecture.md`](docs/architecture.md) — décisions d'architecture (ADR).
|
||||
- [`docs/deploiement.md`](docs/deploiement.md) — auto-hébergement (SvelteKit + tileserver-gl).
|
||||
- [`docs/contribution.md`](docs/contribution.md) — ajouter un lieu et lier sa fiche Wikidata.
|
||||
- [`docs/audit-oki.md`](docs/audit-oki.md) — audit qualité et doctrine OKI.
|
||||
- [`prompts/`](prompts/) — prompts de mission et d'audit ayant produit cette refonte.
|
||||
|
||||
## Contributions
|
||||
|
||||
Les contributions sont les bienvenues ! Si vous souhaitez contribuer à ce projet, n'hésitez pas à soumettre des pull requests.
|
||||
Les contributions sont les bienvenues ! Ajouter un lieu se fait par pull request (voir [`docs/contribution.md`](docs/contribution.md)).
|
||||
|
||||
## License
|
||||
## Historique
|
||||
|
||||
Copyright (C) 2024 Cédric Famibelle-Pronzola & ORGANISATION KA INTERNATIONALE (OKI)
|
||||
La version 1 (PHP, cartes des communes) a été remplacée par cette refonte en juillet 2026 ; elle reste disponible dans l'historique Git (`git log` avant le commit de refonte).
|
||||
|
||||
## Licence
|
||||
|
||||
### FR
|
||||
Copyright (C) 2024-2026 Cédric Famibelle-Pronzola & ORGANISATION KA INTERNATIONALE (OKI)
|
||||
|
||||
Ce programme est un logiciel libre : vous pouvez le redistribuer et/ou le modifier selon les termes de la licence publique générale GNU Affero publiée par la Free Software Foundation, soit la version 3 de la licence, soit (à votre choix) toute version ultérieure.
|
||||
|
||||
Ce programme est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE ; sans même la garantie implicite de COMMERCIALISATION ou d'ADAPTATION À UN USAGE PARTICULIER. Voir la licence publique générale GNU Affero pour plus de détails.
|
||||
|
||||
Vous devriez avoir reçu une copie de la licence publique générale GNU Affero avec ce programme. Si ce n'est pas le cas, consultez https://www.gnu.org/licenses/.
|
||||
|
||||
|
||||
### EN
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
Code sous licence **MIT** (voir [LICENSE](LICENSE)). Les photographies restent la propriété de leurs auteurs sous leurs licences Wikimedia Commons (voir [`content/credits.md`](content/credits.md)) ; les extraits Wikipédia sont sous CC BY-SA 4.0.
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 18px; /* Taille de base pour les grands écrans */
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 24px; /* Taille de base pour les titres sur les grands écrans */
|
||||
margin: 0.5em;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
li {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #1F51FF;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Requêtes média pour les écrans de moins de 600px de large */
|
||||
@media (max-width: 600px) {
|
||||
body {
|
||||
font-size: 8vw; /* Augmente la taille de la police sur les petits écrans */
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 5.5vw; /* Augmente la taille de la police des titres sur les petits écrans */
|
||||
}
|
||||
|
||||
ul, li {
|
||||
padding: 3vw; /* Augmente le padding pour plus d'espace */
|
||||
}
|
||||
}
|
||||
-81
@@ -1,81 +0,0 @@
|
||||
#back-button {
|
||||
margin-left: 1em;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html, body, #map {
|
||||
height: 90%;
|
||||
}
|
||||
|
||||
#chrono {
|
||||
font-weight: bold;
|
||||
margin-top: 1em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.game-button {
|
||||
background-color: #3498db;
|
||||
border: 2px solid #3498db;
|
||||
border-radius: 5px;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
font-size: 15px;
|
||||
margin-bottom: .3em;
|
||||
padding: 8px 15px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.game-button:hover {
|
||||
background-color: #2980b9;
|
||||
border-color: #2980b9;
|
||||
}
|
||||
|
||||
.game-button:disabled {
|
||||
background-color: #d8d8d8;
|
||||
border-color: #d8d8d8;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
#title,div {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#penalty {
|
||||
opacity: 1;
|
||||
transition: opacity 1s ease;
|
||||
}
|
||||
|
||||
.popup-ko .maplibregl-popup-content {
|
||||
background-color: rgba(255, 0, 0, 0.9);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 0px 0px 2px rgb(0, 0, 0);
|
||||
}
|
||||
|
||||
.popup-ok .maplibregl-popup-content {
|
||||
background-color: rgba(0, 255, 34, 0.9);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 0px 0px 2px rgb(0, 0, 0);
|
||||
}
|
||||
|
||||
.maplibregl-popup-tip {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
body {
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 5.5vw;
|
||||
}
|
||||
|
||||
ul, li {
|
||||
padding: 3vw;
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
@@ -1,9 +0,0 @@
|
||||
<?= "
|
||||
<div style='display: flex; justify-content: center; align-items: center;'>
|
||||
<h1 id='title'>$zone</h1>
|
||||
<a style='text-decoration: none;' href='/'>
|
||||
<button id='back-button'>🔙 Retour</button>
|
||||
</a>
|
||||
</div>
|
||||
";
|
||||
?>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?= "
|
||||
<div style='display: flex; justify-content: center;'>
|
||||
<button class='game-button' disabled style='margin-right: 2em;' onClick='startGame()' id='start' type='button'>Commencer la partie</button>
|
||||
<button class='game-button' disabled onClick='restartGame()' id='restart' type='button'>Recommencer</button>
|
||||
</div>
|
||||
|
||||
<div id='chrono'></div>
|
||||
<div id='score' style='display: flex; justify-content: center;'></div>
|
||||
|
||||
<div id='question'></div>
|
||||
";
|
||||
?>
|
||||
@@ -1,19 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Choisis une carte</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="./css/index.css" />
|
||||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Choisis une carte</h1>
|
||||
<ul>
|
||||
<li><a href="kat/DINA-MORGABIN.php">DINA MORGABIN (La Réunion)</a></li>
|
||||
<li><a href="kat/GUYANE.php">GUYANE</a></li>
|
||||
<li><a href="kat/KMT.php">KMT (Afrique)</a></li>
|
||||
<li><a href="kat/KARUKERA.php">KARUKERA (Guadeloupe)</a></li>
|
||||
<li><a href="kat/WANAKAERA.php">WANAKAERA (Martinique)</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,554 +0,0 @@
|
||||
/**
|
||||
* js/map.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Typos
|
||||
*
|
||||
* Après l'ajout de l'Afrique, on remplace "communes" par "zones"
|
||||
* Zones = Communes ou Pays
|
||||
*/
|
||||
|
||||
/**
|
||||
* Récupérer le nom du fichier actuel (ex: 971.php) et en extraire le code du département (ex: 971).
|
||||
*/
|
||||
const currentFileName = window.location.pathname.split('/').pop()
|
||||
const codeCarte = currentFileName.split('.')[0]
|
||||
|
||||
const startButton = document.getElementById('start')
|
||||
const restartButton = document.getElementById('restart')
|
||||
|
||||
restartButton.setAttribute('disabled', true)
|
||||
|
||||
/**
|
||||
* Définir le centre , le niveau de zoom et le style de la carte en fonction du code du département.
|
||||
*/
|
||||
let centerCoordinates
|
||||
let zoomLevel
|
||||
let styleFileName
|
||||
|
||||
switch (codeCarte) {
|
||||
case 'KMT':
|
||||
centerCoordinates = [21.21, 1.36] // Afrique
|
||||
zoomLevel = 2.7
|
||||
styleFileName = 'ortho-jwe-KMT.json'
|
||||
break
|
||||
case 'KARUKERA':
|
||||
centerCoordinates = [-61.4167, 16.25] // Guadeloupe
|
||||
zoomLevel = 9
|
||||
styleFileName = 'ortho.json'
|
||||
break
|
||||
case 'WANAKAERA':
|
||||
centerCoordinates = [-61.01635, 14.60285] // Martinique
|
||||
zoomLevel = 9.5
|
||||
styleFileName = 'ortho.json'
|
||||
break
|
||||
case 'GUYANE':
|
||||
centerCoordinates = [-53.1258, 3.9339] // Guyane française
|
||||
zoomLevel = 7
|
||||
styleFileName = 'ortho-jwe.json'
|
||||
break
|
||||
case 'DINA-MORGABIN':
|
||||
centerCoordinates = [55.52905, -21.13014] // La Réunion
|
||||
styleFileName = 'ortho.json'
|
||||
zoomLevel = 9.5
|
||||
break
|
||||
default:
|
||||
centerCoordinates = [-61.4167, 16.25] // Par défaut (Guadeloupe)
|
||||
styleFileName = 'ortho.json'
|
||||
zoomLevel = 9.5
|
||||
}
|
||||
|
||||
/**
|
||||
* Définit les décalages des popups en fonction de leur position.
|
||||
*/
|
||||
const popupOffsets = {
|
||||
'top': [0, 0],
|
||||
'top-left': [0, 0],
|
||||
'top-right': [0, 0],
|
||||
'bottom': [0, -30],
|
||||
'bottom-left': [0, -50],
|
||||
'bottom-right': [0, -50],
|
||||
'left': [25, -25],
|
||||
'right': [-25, -25]
|
||||
}
|
||||
|
||||
/**
|
||||
* Référence aux éléments HTML pour afficher le score.
|
||||
*/
|
||||
let ok
|
||||
let ko
|
||||
let penaltyElement
|
||||
|
||||
/**
|
||||
* Gestion du temps écoulé
|
||||
*/
|
||||
let gameTime = 0
|
||||
let gameMinute = 0
|
||||
let gameSecond = 0
|
||||
let gamePenalty = 0
|
||||
let gameTimeWithPenalty = 0
|
||||
let gameMinuteWithPenalty = 0
|
||||
let gameSecondWithPenalty = 0
|
||||
let intervalId
|
||||
|
||||
/**
|
||||
* État actuel de la commune survolée.
|
||||
*/
|
||||
let hoveredStateId = null
|
||||
|
||||
/**
|
||||
* Référence à la commune actuellement sélectionnée pour trouver.
|
||||
*/
|
||||
let currentZone = null
|
||||
|
||||
/**
|
||||
* Ensemble des codes des communes déjà trouvées correctement.
|
||||
*/
|
||||
const correctAnswers = new Set()
|
||||
|
||||
/**
|
||||
* Permet de remettre le jeu à 0
|
||||
*/
|
||||
function resetGame() {
|
||||
ok.innerText = 0
|
||||
ko.innerText = 0
|
||||
correctAnswers.clear()
|
||||
clearInterval(intervalId)
|
||||
intervalId = null
|
||||
gameTime = 0
|
||||
gamePenalty = 0
|
||||
gameTimeWithPenalty = 0
|
||||
}
|
||||
|
||||
/**
|
||||
* Active le bouton "Commencer la partie" au chargement de la page
|
||||
*/
|
||||
window.onload = function() {
|
||||
const startElement = document.getElementById('start')
|
||||
startElement.removeAttribute('disabled')
|
||||
}
|
||||
|
||||
function startGame() {
|
||||
loadMap()
|
||||
|
||||
const question = document.getElementById('question')
|
||||
const score = document.getElementById('score')
|
||||
const chrono = document.getElementById('chrono')
|
||||
|
||||
question.innerHTML = `<p style='font-weight: bold;'>Trouve ${codeCarte === 'KMT' ? 'le pays' : 'la commune'}</p><p id='commune' style='font-size: 30px; font-weight: bold; color: #1F51FF'>...</p>`
|
||||
score.innerHTML = "<p style='color: green; font-weight: bold; margin-right: 2em;'>Correct ✅ : <span style='color: black;' id='OK'>0</span></p><p style='color: red; font-weight: bold;'>Faux ❌ : <span style='color: black;' id='KO'>0</span></p>"
|
||||
chrono.innerHTML = "<p>Temps écoulé : <span id='time'></span><span style='margin-left: 1em;color: red; font-weight: bold;' id='penalty'></span></p>"
|
||||
|
||||
communeObserver()
|
||||
|
||||
ok = document.getElementById('OK')
|
||||
ko = document.getElementById('KO')
|
||||
penaltyElement = document.getElementById('penalty')
|
||||
|
||||
|
||||
startButton.setAttribute('disabled', true)
|
||||
restartButton.removeAttribute('disabled')
|
||||
|
||||
resetGame()
|
||||
}
|
||||
|
||||
/**
|
||||
* Recommencer la partie
|
||||
*/
|
||||
function restartGame() {
|
||||
startGame()
|
||||
}
|
||||
|
||||
/**
|
||||
* Observe le contenu de l'élément ayant pour id "commune"
|
||||
*/
|
||||
function communeObserver(){
|
||||
const communeElement = document.getElementById('commune')
|
||||
const timeElement = document.getElementById('time')
|
||||
|
||||
// Options de l'observateur (quelles sont les mutations à observer)
|
||||
const config = { childList: true, subtree: true, characterData: true }
|
||||
|
||||
// Fonction callback à éxécuter quand une mutation est observée
|
||||
const callback = function (mutationsList) {
|
||||
for (var mutation of mutationsList) {
|
||||
if (mutation.type == "childList" || mutation.type == "characterData") {
|
||||
// Vérifie si le contenu de la balise span n'est pas égal à "..."
|
||||
if (communeElement.textContent.trim() !== "...") {
|
||||
// Vérifie si setInterval n'est pas déjà en cours
|
||||
if (!intervalId) {
|
||||
intervalId = setInterval(() => {
|
||||
gameTime++
|
||||
gameTimeWithPenalty = gameTime + gamePenalty
|
||||
|
||||
if (gameTimeWithPenalty >= 60) {
|
||||
gameMinuteWithPenalty = String(gameTimeWithPenalty / 60).split('.')[0]
|
||||
gameMinute = String(gameTime / 60).split('.')[0]
|
||||
|
||||
gameSecondWithPenalty = gameTimeWithPenalty % 60
|
||||
gameSecond = gameTime % 60
|
||||
timeElement.innerText = `${gameMinuteWithPenalty} minute${gameMinuteWithPenalty > 1 ? 's' : ''} ${gameSecondWithPenalty} seconde${gameSecondWithPenalty > 1 ? 's' : ''}`
|
||||
} else {
|
||||
timeElement.innerText = `${gameTimeWithPenalty} seconde${gameTimeWithPenalty > 1 ? 's' : ''}`
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Créé une instance de l'observateur lié à la fonction de callback
|
||||
const observer = new MutationObserver(callback)
|
||||
|
||||
// Commence à observer le noeud cible pour les mutations précédemment configurées
|
||||
observer.observe(communeElement, config)
|
||||
}
|
||||
|
||||
/**
|
||||
* Récupère les propriétés des communes depuis un fichier GeoJSON en fonction du code du département.
|
||||
*
|
||||
* @async
|
||||
* @param {string} codeCarte - Code de la carte.
|
||||
* @returns {Promise<Object[]>} Promesse résolue avec les propriétés des communes.
|
||||
*/
|
||||
async function getFile(codeCarte) {
|
||||
try {
|
||||
const response = await fetch(`../kat/data/${codeCarte}/contours-${codeCarte === 'KMT' ? 'pays' : 'communes'}.geojson`)
|
||||
if (!response.ok) {
|
||||
throw new Error(`Échec du chargement du fichier JSON : ${response.statusText}`)
|
||||
}
|
||||
|
||||
data = await response.json()
|
||||
return data.features.map(({properties}) => properties)
|
||||
} catch (error) {
|
||||
console.error('Erreur:', error)
|
||||
throw new Error(error)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Récupère les coordonnées du centre de la commune depuis le fichier "centres.json" en fonction du code du département.
|
||||
*
|
||||
* @param {string} codeCarte - Code de la carte.
|
||||
* @param {string} codeZone - Code de la zone.
|
||||
* @returns {Promise<number[]>} Promesse résolue avec les coordonnées du centre de la commune.
|
||||
*/
|
||||
async function getZoneCenterCoordinates(codeCarte, codeZone) {
|
||||
try {
|
||||
// Utiliser fetch pour lire le fichier "centres.json"
|
||||
const response = await fetch(`../kat/data/${codeCarte}/centres.json`)
|
||||
if (!response.ok) {
|
||||
throw new Error(`Échec du chargement du fichier JSON : ${response.statusText}`)
|
||||
}
|
||||
|
||||
const centerData = await response.json()
|
||||
|
||||
// Vérifier si le code de la zone existe dans les données
|
||||
if (codeZone in centerData) {
|
||||
const coordinates = centerData[codeZone]
|
||||
return coordinates
|
||||
} else {
|
||||
throw new Error(`Aucune donnée de centre trouvée pour la commune : ${codeZone}`)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Erreur lors de la récupération des coordonnées du centre de la commune :', error)
|
||||
throw new Error(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Met à jour le score en fonction de la réponse.
|
||||
*
|
||||
* @param {boolean} isCorrect - Indique si la réponse est correcte.
|
||||
*/
|
||||
function updateScore(isCorrect) {
|
||||
if (isCorrect) {
|
||||
ok.innerText = Number.parseInt(ok.innerText, 10) + 1
|
||||
} else {
|
||||
ko.innerText = Number.parseInt(ko.innerText, 10) + 1
|
||||
gamePenalty += 5
|
||||
|
||||
penaltyElement.style.opacity = 1
|
||||
penaltyElement.innerText = '+ 5 secondes'
|
||||
|
||||
setTimeout(() => {
|
||||
penaltyElement.style.opacity = 0
|
||||
penaltyElement.innerText = ''
|
||||
}, 2000)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sélectionne une commune au hasard parmi celles qui n'ont pas encore été trouvées.
|
||||
*
|
||||
* @param {Array} zones - Liste de toutes les zones.
|
||||
* @returns {Object|null} Retourne la commune sélectionnée ou null si toutes les zones ont été trouvées.
|
||||
*/
|
||||
function pickRandomZone(zones) {
|
||||
const zonesRestantes = zones.filter(commune => !correctAnswers.has(commune.code))
|
||||
|
||||
if (zonesRestantes.length === 0) {
|
||||
return null
|
||||
}
|
||||
|
||||
const index = Math.floor(Math.random() * zonesRestantes.length)
|
||||
return zonesRestantes[index]
|
||||
}
|
||||
|
||||
/**
|
||||
* Vérifie si le code de la zone cliquée correspond à la commune actuelle à trouver.
|
||||
*
|
||||
* @param {string} codeZone - code de la zone à vérifier.
|
||||
* @returns {boolean} Résultat de la vérification.
|
||||
*/
|
||||
function checkAnswer(codeZone) {
|
||||
return currentZone && codeZone === currentZone.code
|
||||
}
|
||||
|
||||
/**
|
||||
* Charge la carte
|
||||
*/
|
||||
function loadMap() {
|
||||
/**
|
||||
* Initialise et configure la carte
|
||||
*/
|
||||
const map = new maplibregl.Map({
|
||||
container: 'map',
|
||||
style: `../kat/styles/${styleFileName}`,
|
||||
center: centerCoordinates,
|
||||
zoom: zoomLevel
|
||||
})
|
||||
|
||||
if (codeCarte !== 'GUYANE') {
|
||||
/**
|
||||
* Désactive le zoom, le double-clic, le déplacement de la carte pour les cartes autres que celle la Guyane.
|
||||
*/
|
||||
map.scrollZoom.disable()
|
||||
map.doubleClickZoom.disable()
|
||||
map.dragPan.disable()
|
||||
} else {
|
||||
/**
|
||||
* Ajoute les contrôles de navigation à la carte, et définit les niveaux de zoom minimum et maximum pour la Guyane.
|
||||
*/
|
||||
map.addControl(new maplibregl.NavigationControl({showCompass: false}))
|
||||
map.setMinZoom(7)
|
||||
map.setMaxZoom(9.5)
|
||||
}
|
||||
|
||||
if (codeCarte === 'KMT') {
|
||||
/**
|
||||
* Ajoute les contrôles de navigation à la carte, et définit les niveaux de zoom minimum et maximum pour l'Afrique'.
|
||||
*/
|
||||
map.addControl(new maplibregl.NavigationControl({showCompass: false}))
|
||||
map.setMinZoom(2.4)
|
||||
map.setMaxZoom(9)
|
||||
map.dragPan.enable()
|
||||
}
|
||||
|
||||
/**
|
||||
* Code pour la gestion des événements de la carte (load, mousemove, mouseleave, click).
|
||||
*/
|
||||
map.on('load', async () => {
|
||||
const zones = await getFile(codeCarte)
|
||||
|
||||
/**
|
||||
* Définit la zone actuelle à trouver et met à jour l'affichage.
|
||||
*
|
||||
* @param {Object} zone - La zone à définir comme actuelle.
|
||||
*/
|
||||
function setZone(zone) {
|
||||
if (currentZone) {
|
||||
map.setFeatureState(
|
||||
{source: 'communes', id: currentZone.code},
|
||||
{current: false}
|
||||
)
|
||||
}
|
||||
|
||||
currentZone = zone
|
||||
document.getElementById('commune').innerText = zone.nom
|
||||
|
||||
map.setFeatureState(
|
||||
{source: 'communes', id: zone.code},
|
||||
{current: true}
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajouter une source de données pour les communes.
|
||||
*/
|
||||
map.addSource('communes', {
|
||||
'type': 'geojson',
|
||||
'data': `../kat/data/${codeCarte}/contours-${codeCarte === 'KMT' ? 'pays' : 'communes'}.geojson`,
|
||||
'promoteId': 'code'
|
||||
})
|
||||
|
||||
/**
|
||||
* Ajouter une couche de remplissage pour les communes.
|
||||
*/
|
||||
map.addLayer({
|
||||
'id': 'drom',
|
||||
'type': 'fill',
|
||||
'source': 'communes',
|
||||
'layout': {},
|
||||
'paint': {
|
||||
'fill-color': '#1F51FF',
|
||||
'fill-opacity': [
|
||||
'case',
|
||||
['boolean', ['feature-state', 'hover'], false],
|
||||
0.8,
|
||||
0
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* Ajouter une couche de remplissage pour les communes (2ème couche), en prenant en compte les réponses correctes et incorrectes.
|
||||
*/
|
||||
map.addLayer({
|
||||
'id': 'drom-2',
|
||||
'type': 'fill',
|
||||
'source': 'communes',
|
||||
'layout': {},
|
||||
'paint': {
|
||||
'fill-color': [
|
||||
'case',
|
||||
['boolean', ['feature-state', 'correct'], false], '#00FF00',
|
||||
['boolean', ['feature-state', 'incorrect'], false], '#FF0000',
|
||||
'rgba(0,0,0,0)'
|
||||
],
|
||||
'fill-opacity': [
|
||||
'case',
|
||||
['boolean', ['feature-state', 'hover'], false], 0.5,
|
||||
0.8
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* Gère l'evenement mousemove (quand la souris survole la commune)
|
||||
*/
|
||||
map.on('mousemove', 'drom', e => {
|
||||
map.getCanvas().style.cursor = 'pointer'
|
||||
if (e.features.length > 0) {
|
||||
if (hoveredStateId) {
|
||||
map.setFeatureState(
|
||||
{source: 'communes', id: hoveredStateId},
|
||||
{hover: false}
|
||||
)
|
||||
}
|
||||
hoveredStateId = e.features[0].id
|
||||
map.setFeatureState(
|
||||
{source: 'communes', id: hoveredStateId},
|
||||
{hover: true}
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* Gère l'evenement mouseleave (quand la souris quitte la zone)
|
||||
*/
|
||||
map.on('mouseleave', 'drom', () => {
|
||||
map.getCanvas().style.cursor = ''
|
||||
if (hoveredStateId) {
|
||||
map.setFeatureState(
|
||||
{source: 'communes', id: hoveredStateId},
|
||||
{hover: false}
|
||||
)
|
||||
}
|
||||
hoveredStateId = null
|
||||
})
|
||||
|
||||
/**
|
||||
* Gère l'evenement click (quand on clique sur la zone)
|
||||
*/
|
||||
map.on('click', 'drom', async e => {
|
||||
if (e.features.length > 0) {
|
||||
const clickedCodeZone = e.features[0].id
|
||||
const clickedZoneNom = e.features[0].properties.nom
|
||||
const isCorrect = checkAnswer(clickedCodeZone)
|
||||
|
||||
if (isCorrect) {
|
||||
updateScore(true)
|
||||
const centerCoordinates = await getZoneCenterCoordinates(codeCarte, clickedCodeZone)
|
||||
|
||||
const popup = new maplibregl.Popup({offset: popupOffsets, closeButton: false, className: 'popup-ok'})
|
||||
.setLngLat([centerCoordinates[0], centerCoordinates[1]])
|
||||
.setHTML(`<h3>Bravo, c'est ${clickedZoneNom}</h3>`)
|
||||
.setMaxWidth('200px')
|
||||
.addTo(map)
|
||||
|
||||
setTimeout(() => {
|
||||
popup.remove()
|
||||
}, 1500)
|
||||
|
||||
correctAnswers.add(clickedCodeZone)
|
||||
zones.forEach(commune => {
|
||||
map.setFeatureState(
|
||||
{source: 'communes', id: commune.code},
|
||||
{incorrect: false}
|
||||
)
|
||||
})
|
||||
map.setFeatureState(
|
||||
{source: 'communes', id: clickedCodeZone},
|
||||
{correct: true, current: false}
|
||||
)
|
||||
|
||||
const newZone = pickRandomZone(zones)
|
||||
if (newZone) {
|
||||
setZone(newZone)
|
||||
} else {
|
||||
const totalAnswers = Number.parseInt(ok.innerText, 10) + Number.parseInt(ko.innerText, 10)
|
||||
const percentageCorrectAnswers = (Number.parseInt(ok.innerText, 10) / totalAnswers) * 100
|
||||
|
||||
let elapsedTime = `${gameTime} seconde${gameTime > 1 ? 's' : ''}`
|
||||
let elapsedTimeWithPenalty = `${gameTimeWithPenalty} seconde${gameTimeWithPenalty > 1 ? 's' : ''}`
|
||||
|
||||
if (gameTime >= 60) {
|
||||
elapsedTime = `${gameMinute} minute${gameMinute > 1 ? 's' : ''} ${gameSecond} seconde${gameSecond > 1 ? 's' : ''}`
|
||||
}
|
||||
|
||||
if (gameTimeWithPenalty >= 60) {
|
||||
elapsedTimeWithPenalty = `${gameMinuteWithPenalty} minute${gameMinuteWithPenalty > 1 ? 's' : ''} ${gameSecondWithPenalty} seconde${gameSecondWithPenalty > 1 ? 's' : ''}`
|
||||
}
|
||||
|
||||
alert(`${Math.round(percentageCorrectAnswers)}% de bonnes réponses !
|
||||
\nTemps écoulé : ${elapsedTime} ! ${gamePenalty ? `
|
||||
\nPénalité : ${gamePenalty} secondes` : '\nAucune pénalité !'}
|
||||
\nTemps total : ${elapsedTimeWithPenalty}`)
|
||||
clearInterval(intervalId)
|
||||
gameTime = 0
|
||||
gameTimeWithPenalty = 0
|
||||
|
||||
setTimeout(() => {
|
||||
location.reload()
|
||||
}, 1000)
|
||||
}
|
||||
} else {
|
||||
updateScore(false)
|
||||
const centerCoordinates = await getZoneCenterCoordinates(codeCarte, clickedCodeZone)
|
||||
|
||||
const popup = new maplibregl.Popup({offset: popupOffsets, closeButton: false, className: 'popup-ko'})
|
||||
.setLngLat([centerCoordinates[0], centerCoordinates[1]])
|
||||
.setHTML(`<h3>Faux, c'est ${clickedZoneNom}</h3>`)
|
||||
.setMaxWidth('200px')
|
||||
.addTo(map)
|
||||
|
||||
setTimeout(() => {
|
||||
popup.remove()
|
||||
}, 1500)
|
||||
|
||||
map.setFeatureState(
|
||||
{source: 'communes', id: clickedCodeZone},
|
||||
{incorrect: true}
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const zone = pickRandomZone(zones)
|
||||
setZone(zone)
|
||||
})
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>JWE - KAT</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/maplibre-gl/5.0.0/maplibre-gl.css" />
|
||||
<link rel="stylesheet" href="../css/map.css" />
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$zone = 'DINA MORGABIN (La Réunion)';
|
||||
include('../game-control/back.php');
|
||||
include('../game-control/start.php');
|
||||
?>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/maplibre-gl/5.0.0/maplibre-gl.js"></script>
|
||||
<script src="../js/map.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>JWE - KAT</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/maplibre-gl/5.0.0/maplibre-gl.css" />
|
||||
<link rel="stylesheet" href="../css/map.css" />
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$zone = 'GUYANE';
|
||||
include('../game-control/back.php');
|
||||
include('../game-control/start.php');
|
||||
?>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/maplibre-gl/5.0.0/maplibre-gl.js"></script>
|
||||
<script src="../js/map.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>JWE - KAT</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/maplibre-gl/5.0.0/maplibre-gl.css" />
|
||||
<link rel="stylesheet" href="../css/map.css" />
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$zone = 'KARUKERA (Guadeloupe)';
|
||||
include('../game-control/back.php');
|
||||
include('../game-control/start.php');
|
||||
?>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/maplibre-gl/5.0.0/maplibre-gl.js"></script>
|
||||
<script src="../js/map.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>JWE - KAT</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/maplibre-gl/5.0.0/maplibre-gl.css" />
|
||||
<link rel="stylesheet" href="../css/map.css" />
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$zone = 'KMT (Afrique)';
|
||||
include('../game-control/back.php');
|
||||
include('../game-control/start.php');
|
||||
?>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/maplibre-gl/5.0.0/maplibre-gl.js"></script>
|
||||
<script src="../js/map.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>JWE - KAT</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/maplibre-gl/5.0.0/maplibre-gl.css" />
|
||||
<link rel="stylesheet" href="../css/map.css" />
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$zone = 'WANAKAERA (Martinique)';
|
||||
include('../game-control/back.php');
|
||||
include('../game-control/start.php');
|
||||
?>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/maplibre-gl/5.0.0/maplibre-gl.js"></script>
|
||||
<script src="../js/map.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
{"97401":[55.3629,-21.2019],"97402":[55.6266,-21.0316],"97403":[55.4937,-21.2108],"97404":[55.358,-21.2348],"97405":[55.5706,-21.333],"97406":[55.6442,-21.153],"97407":[55.3038,-20.946],"97408":[55.3918,-20.9967],"97409":[55.6373,-20.9568],"97410":[55.6312,-21.0887],"97411":[55.4444,-20.9434],"97412":[55.644,-21.2921],"97413":[55.3432,-21.1816],"97414":[55.4224,-21.2255],"97415":[55.3402,-21.0366],"97416":[55.5043,-21.309],"97417":[55.7436,-21.3084],"97418":[55.5234,-20.9463],"97419":[55.7418,-21.1778],"97420":[55.5936,-20.9507],"97421":[55.5145,-21.0524],"97422":[55.5701,-21.225],"97423":[55.3377,-21.1138],"97424":[55.4555,-21.1403]}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"97301":[-52.4797,4.0081],"97302":[-52.3319,4.9464],"97303":[-53.2979,5.2395],"97304":[-52.7764,4.9085],"97305":[-52.4834,4.9925],"97306":[-53.6784,4.9955],"97307":[-52.3498,4.8281],"97308":[-52.075,3.8078],"97309":[-52.2809,4.8897],"97310":[-52.5164,4.4685],"97311":[-54.0105,4.9478],"97312":[-53.0097,5.2418],"97313":[-52.5059,4.8124],"97314":[-51.8261,4.2104],"97352":[-53.4333,3.8181],"97353":[-53.8275,3.049],"97356":[-52.6916,2.8679],"97357":[-54.1148,4.3756],"97358":[-53.1108,4.4853],"97360":[-54.2171,4.9019],"97361":[-53.9167,5.6743],"97362":[-54.0463,4.0165]}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"ETH":[38.947611801806495,9.176814264950167],"SDS":[30.333984675480757,7.914722205528841],"SOM":[46.5464912522007,6.019175354863551],"KEN":[37.67592532581279,0.5754517148962938],"MWI":[34.09609576769113,-12.735921358471073],"TZA":[35.02498976184473,-6.566525957661288],"SOL":[45.53479066506411,10.023473808092941],"MAR":[-9.046877128746582,28.467636665531234],"SAH":[-12.391359135142558,24.416734554893036],"COG":[14.38464128008542,-1.1354128251164652],"COD":[23.704062532123782,-4.540787787186473],"NAM":[18.118996644631416,-21.83831839276176],"ZAF":[25.24975775021357,-28.817139228003967],"LBY":[17.664886093139636,28.172444725036605],"TUN":[9.882258580942635,34.22426090761612],"ZMB":[28.80207441614033,-12.512532465508636],"SLE":[-11.936779785156242,8.548585165700597],"GIN":[-10.715817638913904,10.109710183267284],"LBR":[-9.0900040336277,6.986474255548001],"CAF":[20.072171294504646,6.3873503410410155],"SDN":[30.120938288256728,13.975380990751114],"DJI":[42.62365767045457,11.756886541193175],"ERI":[39.367317191633596,15.18048657614088],"CIV":[-5.781225753157097,7.972692202215326],"MLI":[-5.421274816662242,14.822845678349621],"SEN":[-14.389369189049583,14.030028086260339],"NGA":[7.736925662551809,8.550665249482046],"BEN":[2.3506708850599414,9.720748943172085],"AGO":[17.418358503069197,-10.850000871930797],"BWA":[24.581611328124996,-22.54493652343752],"ZWE":[29.6308403060281,-19.12852949334319],"TCD":[18.96083041487069,12.76727387526939],"DZA":[1.7720829050164644,29.20973285875821],"MOZ":[35.32805940685356,-17.11878541610783],"SWZ":[31.558316617398656,-26.473094383445954],"BDI":[29.989004159902603,-3.062598924512992],"RWA":[29.916395531631114,-2.013365806021347],"UGA":[32.11797202339386,1.3982593728177313],"LSO":[28.192589689555945,-29.671546052631577],"CMR":[13.006806556679795,6.257060071185528],"GAB":[11.616017795138896,-0.8739639395254695],"NER":[6.34184839443898,15.351725132258853],"BFA":[-1.6133907257564375,11.978387935577883],"TGO":[0.7269224654796614,8.681028948643402],"GHA":[-1.0836453419811212,8.284749272184547],"GNB":[-15.375719884923969,11.688141034100504],"EGY":[30.779661923363108,27.661831325954854],"MRT":[-11.604420093309178,19.791261755485873],"GNQ":[9.71551682692309,2.0668689903846107],"GMB":[-15.49098985460068,13.434295654296868],"MDG":[46.962987167300405,-17.773911299904935],"COM":[43.85425415039061,-11.994052124023446],"STP":[6.957070312500013,0.8602416992187436],"CPV":[-23.908437994462016,16.04201691060126]}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"97101":[-61.4967,16.2678],"97102":[-61.4698,16.4668],"97103":[-61.5951,16.2498],"97104":[-61.7158,16.0497],"97105":[-61.7294,15.9992],"97106":[-61.7578,16.1387],"97107":[-61.6197,16.0486],"97108":[-61.2296,15.9176],"97109":[-61.689,16.0057],"97110":[-61.0814,16.2972],"97111":[-61.7831,16.3194],"97112":[-61.2929,15.9085],"97113":[-61.4749,16.2274],"97114":[-61.615,16.1231],"97115":[-61.6695,16.2443],"97116":[-61.4988,16.3212],"97117":[-61.36,16.3354],"97118":[-61.658,16.1695],"97119":[-61.4547,16.3921],"97120":[-61.5379,16.2351],"97121":[-61.7651,16.227],"97122":[-61.488,16.4201],"97124":[-61.6953,16.0406],"97125":[-61.2539,16.2784],"97126":[-61.2732,15.9654],"97128":[-61.3896,16.2565],"97129":[-61.6836,16.2937],"97130":[-61.6326,15.8554],"97131":[-61.5892,15.8579],"97132":[-61.6493,15.9931],"97133":[-61.6929,15.9607],"97134":[-61.717,16.0847]}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"97201":[-61.1305,14.816],"97202":[-61.0736,14.4996],"97203":[-61.1237,14.841],"97204":[-61.1584,14.7041],"97205":[-61.1297,14.6593],"97206":[-61.0165,14.4787],"97207":[-60.9685,14.5785],"97208":[-61.1207,14.7228],"97209":[-61.0686,14.6492],"97210":[-60.8976,14.6093],"97211":[-61.1837,14.847],"97212":[-61.0303,14.7084],"97213":[-60.9923,14.6231],"97214":[-61.074,14.7995],"97215":[-61.1465,14.8474],"97216":[-61.0531,14.7796],"97217":[-60.8589,14.4822],"97218":[-61.1217,14.7695],"97219":[-61.1963,14.822],"97220":[-60.897,14.5027],"97221":[-60.9623,14.5262],"97222":[-60.9383,14.675],"97223":[-60.9233,14.5618],"97224":[-61.0407,14.6835],"97225":[-61.1736,14.7717],"97226":[-60.8516,14.4314],"97227":[-60.9467,14.4904],"97228":[-61.0084,14.773],"97229":[-61.1001,14.6518],"97230":[-60.9469,14.7381],"97231":[-61.0376,14.5329],"97232":[-60.8594,14.5421],"97233":[-61.1362,14.7046],"97234":[-61.1459,14.6747]}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,56 +0,0 @@
|
||||
{
|
||||
"version": 8,
|
||||
"glyphs":"https://wxs.ign.fr/static/vectorTiles/fonts/{fontstack}/{range}.pbf",
|
||||
"sources": {
|
||||
"raster-tiles": {
|
||||
"type": "raster",
|
||||
"tiles": [
|
||||
"https://wxs.ign.fr/essentiels/geoportail/wmts?layer=ORTHOIMAGERY.ORTHOPHOTOS&style=normal&tilematrixset=PM&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fjpeg&TileMatrix={z}&TileCol={x}&TileRow={y}"
|
||||
],
|
||||
"tileSize": 256,
|
||||
"attribution": "<a target='_blank' href='https://geoservices.ign.fr/documentation/donnees/ortho/bdortho'>© IGN</a>"
|
||||
},
|
||||
"KMT": {
|
||||
"type": "vector",
|
||||
"url": "https://tiles.jwe.ovh/data/KMT.json"
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"id": "simple-tiles",
|
||||
"type": "raster",
|
||||
"source": "raster-tiles"
|
||||
},
|
||||
{
|
||||
"id": "boundary",
|
||||
"type": "line",
|
||||
"source": "KMT",
|
||||
"source-layer": "boundary",
|
||||
"minzoom": 2,
|
||||
"layout": {
|
||||
"line-join": "round",
|
||||
"visibility": "visible"
|
||||
},
|
||||
"paint": {
|
||||
"line-color": "#ffffff",
|
||||
"line-width": {
|
||||
"base": 1.4,
|
||||
"stops": [
|
||||
[
|
||||
4,
|
||||
2
|
||||
],
|
||||
[
|
||||
5,
|
||||
1
|
||||
],
|
||||
[
|
||||
12,
|
||||
3
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,142 +0,0 @@
|
||||
{
|
||||
"version": 8,
|
||||
"glyphs":"https://wxs.ign.fr/static/vectorTiles/fonts/{fontstack}/{range}.pbf",
|
||||
"sources": {
|
||||
"raster-tiles": {
|
||||
"type": "raster",
|
||||
"tiles": [
|
||||
"https://wxs.ign.fr/essentiels/geoportail/wmts?layer=ORTHOIMAGERY.ORTHOPHOTOS&style=normal&tilematrixset=PM&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fjpeg&TileMatrix={z}&TileCol={x}&TileRow={y}"
|
||||
],
|
||||
"tileSize": 256,
|
||||
"attribution": "<a target='_blank' href='https://geoservices.ign.fr/documentation/donnees/ortho/bdortho'>© IGN</a>"
|
||||
},
|
||||
"cadastre": {
|
||||
"type": "vector",
|
||||
"url": "https://openmaptiles.geo.data.gouv.fr/data/cadastre.json"
|
||||
},
|
||||
"decoupage-administratif": {
|
||||
"type": "vector",
|
||||
"url": "https://openmaptiles.geo.data.gouv.fr/data/decoupage-administratif.json"
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"id": "simple-tiles",
|
||||
"type": "raster",
|
||||
"source": "raster-tiles"
|
||||
},
|
||||
{
|
||||
"id": "communes",
|
||||
"type": "line",
|
||||
"source": "decoupage-administratif",
|
||||
"source-layer": "communes",
|
||||
"minzoom": 2,
|
||||
"layout": {
|
||||
"line-join": "round",
|
||||
"visibility": "visible"
|
||||
},
|
||||
"paint": {
|
||||
"line-color": "#ffffff",
|
||||
"line-width": {
|
||||
"base": 1.4,
|
||||
"stops": [
|
||||
[
|
||||
4,
|
||||
0.4
|
||||
],
|
||||
[
|
||||
5,
|
||||
1
|
||||
],
|
||||
[
|
||||
12,
|
||||
3
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "departements",
|
||||
"type": "line",
|
||||
"source": "decoupage-administratif",
|
||||
"source-layer": "departements",
|
||||
"maxzoom":9,
|
||||
"layout": {
|
||||
"line-join": "round",
|
||||
"visibility": "visible"
|
||||
},
|
||||
"paint": {
|
||||
"line-color": "hsl(248, 7%, 66%)",
|
||||
"line-dasharray": [
|
||||
3,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"line-width": {
|
||||
"base": 1.4,
|
||||
"stops": [
|
||||
[
|
||||
0,
|
||||
0.6
|
||||
],
|
||||
[
|
||||
4,
|
||||
1.4
|
||||
],
|
||||
[
|
||||
5,
|
||||
2
|
||||
],
|
||||
[
|
||||
12,
|
||||
8
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "regions",
|
||||
"type": "line",
|
||||
"source": "decoupage-administratif",
|
||||
"source-layer": "regions",
|
||||
"maxzoom":5,
|
||||
"layout": {
|
||||
"line-join": "round",
|
||||
"visibility": "visible"
|
||||
},
|
||||
"paint": {
|
||||
"line-color": "hsl(248, 7%, 70%)",
|
||||
"line-dasharray": [
|
||||
3,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"line-width": {
|
||||
"base": 1.6,
|
||||
"stops": [
|
||||
[
|
||||
0,
|
||||
0.6
|
||||
],
|
||||
[
|
||||
4,
|
||||
1.4
|
||||
],
|
||||
[
|
||||
5,
|
||||
2
|
||||
],
|
||||
[
|
||||
12,
|
||||
8
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,142 +0,0 @@
|
||||
{
|
||||
"version": 8,
|
||||
"glyphs":"https://orangemug.github.io/font-glyphs/glyphs/{fontstack}/{range}.pbf",
|
||||
"sources": {
|
||||
"raster-tiles": {
|
||||
"type": "raster",
|
||||
"tiles": [
|
||||
"https://data.geopf.fr/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=ORTHOIMAGERY.ORTHOPHOTOS&STYLE=normal&FORMAT=image/jpeg&TILEMATRIXSET=PM&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}"
|
||||
],
|
||||
"tileSize": 256,
|
||||
"attribution": "<a target='_blank' href='https://geoservices.ign.fr/documentation/donnees/ortho/bdortho'>© IGN</a>"
|
||||
},
|
||||
"cadastre": {
|
||||
"type": "vector",
|
||||
"url": "https://openmaptiles.geo.data.gouv.fr/data/cadastre.json"
|
||||
},
|
||||
"decoupage-administratif": {
|
||||
"type": "vector",
|
||||
"url": "https://openmaptiles.geo.data.gouv.fr/data/decoupage-administratif.json"
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"id": "simple-tiles",
|
||||
"type": "raster",
|
||||
"source": "raster-tiles"
|
||||
},
|
||||
{
|
||||
"id": "communes",
|
||||
"type": "line",
|
||||
"source": "decoupage-administratif",
|
||||
"source-layer": "communes",
|
||||
"minzoom": 2,
|
||||
"layout": {
|
||||
"line-join": "round",
|
||||
"visibility": "visible"
|
||||
},
|
||||
"paint": {
|
||||
"line-color": "#ffffff",
|
||||
"line-width": {
|
||||
"base": 1.4,
|
||||
"stops": [
|
||||
[
|
||||
4,
|
||||
0.4
|
||||
],
|
||||
[
|
||||
5,
|
||||
1
|
||||
],
|
||||
[
|
||||
12,
|
||||
3
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "departements",
|
||||
"type": "line",
|
||||
"source": "decoupage-administratif",
|
||||
"source-layer": "departements",
|
||||
"maxzoom":9,
|
||||
"layout": {
|
||||
"line-join": "round",
|
||||
"visibility": "visible"
|
||||
},
|
||||
"paint": {
|
||||
"line-color": "hsl(248, 7%, 66%)",
|
||||
"line-dasharray": [
|
||||
3,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"line-width": {
|
||||
"base": 1.4,
|
||||
"stops": [
|
||||
[
|
||||
0,
|
||||
0.6
|
||||
],
|
||||
[
|
||||
4,
|
||||
1.4
|
||||
],
|
||||
[
|
||||
5,
|
||||
2
|
||||
],
|
||||
[
|
||||
12,
|
||||
8
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "regions",
|
||||
"type": "line",
|
||||
"source": "decoupage-administratif",
|
||||
"source-layer": "regions",
|
||||
"maxzoom":5,
|
||||
"layout": {
|
||||
"line-join": "round",
|
||||
"visibility": "visible"
|
||||
},
|
||||
"paint": {
|
||||
"line-color": "hsl(248, 7%, 70%)",
|
||||
"line-dasharray": [
|
||||
3,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"line-width": {
|
||||
"base": 1.6,
|
||||
"stops": [
|
||||
[
|
||||
0,
|
||||
0.6
|
||||
],
|
||||
[
|
||||
4,
|
||||
1.4
|
||||
],
|
||||
[
|
||||
5,
|
||||
2
|
||||
],
|
||||
[
|
||||
12,
|
||||
8
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user