pax_global_header 0000666 0000000 0000000 00000000064 14466627326 0014532 g ustar 00root root 0000000 0000000 52 comment=40a8f86df5ff9e29bb297f440d1d25b90be186aa
mapsforge-0.20.0/ 0000775 0000000 0000000 00000000000 14466627326 0013574 5 ustar 00root root 0000000 0000000 mapsforge-0.20.0/.gitattributes 0000664 0000000 0000000 00000000410 14466627326 0016462 0 ustar 00root root 0000000 0000000 # Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.sh text
*.java text
*.xml text
*.js text
*.css text
*.svg text
mapsforge-0.20.0/.github/ 0000775 0000000 0000000 00000000000 14466627326 0015134 5 ustar 00root root 0000000 0000000 mapsforge-0.20.0/.github/workflows/ 0000775 0000000 0000000 00000000000 14466627326 0017171 5 ustar 00root root 0000000 0000000 mapsforge-0.20.0/.github/workflows/android.yml 0000664 0000000 0000000 00000001420 14466627326 0021331 0 ustar 00root root 0000000 0000000 name: Android CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Publish
if: github.event_name != 'pull_request'
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: ./gradlew -PSONATYPE_USERNAME="$SONATYPE_USERNAME" -PSONATYPE_PASSWORD="$SONATYPE_PASSWORD" publish
mapsforge-0.20.0/.gitignore 0000664 0000000 0000000 00000000406 14466627326 0015564 0 ustar 00root root 0000000 0000000 # Maven
target
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
# Eclipse
.settings
bin
gen
.classpath
.project
project.properties
# IntelliJ
.idea
*.iml
local.properties
# Gradle
build
.gradle
# Emacs
*~
[#]*[#]
.\#*
mapsforge-0.20.0/COPYING 0000664 0000000 0000000 00000104513 14466627326 0014633 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is 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. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
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.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
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 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. Use with the GNU Affero General Public License.
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 Affero 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 special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 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 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 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.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
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 GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
mapsforge-0.20.0/COPYING.LESSER 0000664 0000000 0000000 00000016743 14466627326 0015636 0 ustar 00root root 0000000 0000000 GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser 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
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
mapsforge-0.20.0/README.md 0000664 0000000 0000000 00000005010 14466627326 0015047 0 ustar 00root root 0000000 0000000 [](https://repo1.maven.org/maven2/org/mapsforge/)
[](http://www.gnu.org/licenses/lgpl-3.0)
# Mapsforge
See the **[integration guide](docs/Integration.md)** and [changelog](docs/Changelog.md). And read through [how to contribute](docs/CONTRIBUTING.md) guidelines.
If you have any questions or problems, don't hesitate to ask the Discussions for help.
- Mapsforge project uses a [compact file format](docs/Specification-Binary-Map-File.md) for fast ad-hoc rendering of OpenStreetMap data.
- We provide tools to [compile your own maps](docs/Getting-Started-Map-Writer.md) with detailed [instructions](docs/MapCreation.md) and also [precompiled maps](https://download.mapsforge.org/).
- It provides [simple boilerplate code](mapsforge-samples-android/src/main/java/org/mapsforge/samples/android/GettingStarted.java) to build applications for Android that display OpenStreetMap-based maps.
- It provides a library to build standalone applications in Java ([instructions](docs/Desktop.md)).
- Mapsforge maps can be flexibly styled with XML style files ([render themes](docs/Rendertheme.md)).
- We provide [tools & library](docs/POI.md) for POI search and also [precompiled POI](https://download.mapsforge.org/).
- Mapsforge supports Android 2.3.3 (API level 10) and above.
- Mapsforge is used by many [applications](docs/Mapsforge-Applications.md).
- Mapsforge is in active [development](docs/Contributors.md).
- Mapsforge [map providers](docs/Mapsforge-Maps.md).
- Mapsforge [talks](docs/Mapsforge-Talks.md).
- Building Mapsforge: set `ANDROID_HOME` environment variable with the Android SDK installation directory
## License
Mapsforge library is under [LGPL v3 license](http://www.gnu.org/licenses/lgpl-3.0), with an important simplification: the constraints mentioned in sections LGPL v3 §4(d) and §4(e) are waived.
This means that you are allowed to convey a Combined Work without providing the user any way to recombine or relink the application and without providing any shared library mechanism.
In other words, you are allowed to include Mapsforge library in your Android application, without making your application open source.
## Screenshots
| Android |
| ------------- |
||
| Desktop |
| ------------- |
||
mapsforge-0.20.0/build.gradle 0000664 0000000 0000000 00000002116 14466627326 0016053 0 ustar 00root root 0000000 0000000 plugins {
id 'com.android.application' version '8.0.2' apply false
}
allprojects {
group = 'org.mapsforge'
version = 'master-SNAPSHOT'
ext.jUnitVersion = "4.12"
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
logging.captureStandardError LogLevel.INFO
logging.captureStandardOutput LogLevel.INFO
}
}
}
static def androidCompileSdk() { return 34 }
// 14 for Support Library
static def androidMinSdk() { return 21 }
static def androidTargetSdk() { return 34 }
static def versionCode() { return 1 }
def versionName() { return version }
subprojects {
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
options.encoding = 'UTF-8'
if (JavaVersion.current().isJava9Compatible()) {
if (!project.properties.containsKey('android')) {
options.compilerArgs.addAll(['--release', '8'])
}
}
}
}
mapsforge-0.20.0/config/ 0000775 0000000 0000000 00000000000 14466627326 0015041 5 ustar 00root root 0000000 0000000 mapsforge-0.20.0/config/checkstyle/ 0000775 0000000 0000000 00000000000 14466627326 0017177 5 ustar 00root root 0000000 0000000 mapsforge-0.20.0/config/checkstyle/checkstyle.xml 0000664 0000000 0000000 00000011023 14466627326 0022054 0 ustar 00root root 0000000 0000000
mapsforge-0.20.0/config/pmd/ 0000775 0000000 0000000 00000000000 14466627326 0015621 5 ustar 00root root 0000000 0000000 mapsforge-0.20.0/config/pmd/pmd_ruleset.xml 0000664 0000000 0000000 00000036425 14466627326 0020700 0 ustar 00root root 0000000 0000000
mapsforge-0.20.0/deploy.gradle 0000664 0000000 0000000 00000004553 14466627326 0016257 0 ustar 00root root 0000000 0000000 apply plugin: 'signing'
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
maven(MavenPublication) {
pom {
name = 'Mapsforge'
description = 'Vector map library and writer - running on Android and Desktop.'
url = 'https://github.com/mapsforge/mapsforge'
licenses {
license {
name = 'GNU Lesser GPL'
url = 'https://www.gnu.org/licenses/lgpl.html'
}
}
developers {
developer {
id = 'thilo.muehlberg'
name = 'Thilo Mühlberg'
email = 'thilo.muehlberg@gmail.com'
}
developer {
id = 'jjbross'
name = 'Jürgen Broß'
email = 'jjbross@gmail.com'
}
developer {
id = 'ludwigbrinckmann'
name = 'Ludwig M Brinckmann'
email = 'ludwigbrinckmann@gmail.com'
}
developer {
id = 'devemux86'
name = 'Emux'
email = 'devemux86@gmail.com'
}
}
scm {
connection = 'scm:git:https://github.com/mapsforge/mapsforge'
developerConnection = 'scm:git:https://github.com/mapsforge/mapsforge'
url = 'https://github.com/mapsforge/mapsforge'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = SONATYPE_USERNAME
password = SONATYPE_PASSWORD
}
}
}
}
signing {
required { !version.endsWith('SNAPSHOT') }
sign publishing.publications.maven
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
mapsforge-0.20.0/docs/ 0000775 0000000 0000000 00000000000 14466627326 0014524 5 ustar 00root root 0000000 0000000 mapsforge-0.20.0/docs/CONTRIBUTING.md 0000664 0000000 0000000 00000002506 14466627326 0016760 0 ustar 00root root 0000000 0000000 ## How to contribute
As an open source project, we welcome new contributors and appreciate your help.
Before you start working on an unresolved issue or try to implement a new feature, please contact us via the Discussions. We will then discuss the best way to realize your proposal and figure out how we can help you to get started quickly.
If you are only requesting a small change in the code, you may attach a patch file to the corresponding issue, but it is best to create a pull request on Github. Make sure that your patch is derived from the latest version in our **master** repository, otherwise we might be unable to apply it. Important is to keep pull requests simple with one feature in each. Please follow our code and style conventions.
Also please keep the pull request commits squashed, in order to avoid the clutter in repository and have only the finally changed files together. One way is described [here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html).
Regarding code make sure your IDE uses UTF-8 encoding, for indentation 4 spaces (no tabs) and follow the conventions you already see in the code.
Please note that the mapsforge project is licenced under the [GNU LGPL3 licence](http://www.gnu.org/licenses/lgpl.html). Thus, all your contributions are going to be published under this license.
mapsforge-0.20.0/docs/Changelog.md 0000664 0000000 0000000 00000060205 14466627326 0016740 0 ustar 00root root 0000000 0000000 # Changelog
## New since 0.20.0
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.21.0)
## Version 0.20.0 (2023-08-15)
- POI: **v3** Android without external libs [#1411](https://github.com/mapsforge/mapsforge/pull/1411)
- Polygon layer: support holes [#1432](https://github.com/mapsforge/mapsforge/pull/1432)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.20.0)
## Version 0.19.0 (2023-04-26)
- Fix incorrect handling of nested tags [#1366](https://github.com/mapsforge/mapsforge/pull/1366)
- Render themes: `curve` parameter [#1371](https://github.com/mapsforge/mapsforge/pull/1371)
- Render themes: `text-transform` parameter [#1372](https://github.com/mapsforge/mapsforge/pull/1372)
- Render themes: `text-wrap-width` parameter [#1379](https://github.com/mapsforge/mapsforge/pull/1379)
- Render themes: `symbol-orientation`, `text-orientation` parameters [#1393](https://github.com/mapsforge/mapsforge/pull/1393)
- Android text wrap improvements [#1392](https://github.com/mapsforge/mapsforge/pull/1392)
- Hillshading: Android scoped storage [#1338](https://github.com/mapsforge/mapsforge/pull/1338)
- Performance improvements [#1367](https://github.com/mapsforge/mapsforge/pull/1367) [#1369](https://github.com/mapsforge/mapsforge/pull/1369)
- POI: sort by distance [#1402](https://github.com/mapsforge/mapsforge/pull/1402)
- POI writer: add all entities by default [#1382](https://github.com/mapsforge/mapsforge/pull/1382)
- POI writer: add normalized name by default [e2eb716](https://github.com/mapsforge/mapsforge/commit/e2eb716936e32d9eced0012de79c3eb6b7577668)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.19.0)
## Version 0.18.0 (2022-06-18)
- Multiple maps: optimize deduplicate [#1288](https://github.com/mapsforge/mapsforge/pull/1288)
- Validate coordinates option [#1294](https://github.com/mapsforge/mapsforge/pull/1294)
- `Parameters.VALIDATE_COORDINATES`
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.18.0)
## Version 0.17.0 (2022-01-03)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.17.0)
## Version 0.16.0 (2021-05-27)
- Android: scoped storage map / theme example [#1186](https://github.com/mapsforge/mapsforge/pull/1186)
- Render theme from zip archive [#1186](https://github.com/mapsforge/mapsforge/pull/1186)
- Render themes: custom resource providers [#1186](https://github.com/mapsforge/mapsforge/pull/1186)
- Nautical unit adapter with feet [#1188](https://github.com/mapsforge/mapsforge/pull/1188)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.16.0)
## Version 0.15.0 (2021-01-01)
- Android: scoped storage map example [#1170](https://github.com/mapsforge/mapsforge/pull/1170)
- Render theme from Android content providers [#1169](https://github.com/mapsforge/mapsforge/pull/1169)
- Render themes: symbol and lineSymbol position attribute [#1172](https://github.com/mapsforge/mapsforge/pull/1172)
- Hillshading from zipped HGT [#1181](https://github.com/mapsforge/mapsforge/pull/1181)
- AssetsRenderTheme: stream improvements [#1167](https://github.com/mapsforge/mapsforge/pull/1167)
- Map frame buffer improvements [#1178](https://github.com/mapsforge/mapsforge/pull/1178)
- `Parameters.FRAME_BUFFER_HA3`
- Symbol scale option [#1179](https://github.com/mapsforge/mapsforge/pull/1179)
- `Parameters.SYMBOL_SCALING`
- Layer scroll event option [#1163](https://github.com/mapsforge/mapsforge/pull/1163)
- `Parameters.LAYER_SCROLL_EVENT`
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.15.0)
## Version 0.14.0 (2020-08-25)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.14.0)
## Version 0.13.0 (2020-01-12)
- Fix marker placement on Android 9+ [#1138](https://github.com/mapsforge/mapsforge/issues/1138)
- Fix hillshading on Android 8+ [#1131](https://github.com/mapsforge/mapsforge/pull/1131)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.13.0)
## Version 0.12.0 (2019-09-17)
- Curved path text rendering [#1112](https://github.com/mapsforge/mapsforge/pull/1112)
- POI writer: normalize names option [#1123](https://github.com/mapsforge/mapsforge/pull/1123)
- Layer groups implementation [#1116](https://github.com/mapsforge/mapsforge/issues/1116)
- Android 10 compatibility [#1120](https://github.com/mapsforge/mapsforge/issues/1120)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.12.0)
## Version 0.11.0 (2019-03-25)
- Render themes: PNG scaling [#1090](https://github.com/mapsforge/mapsforge/issues/1090)
- Polyline scaled width [#1088](https://github.com/mapsforge/mapsforge/issues/1088)
- Hillshading in style menu [#1095](https://github.com/mapsforge/mapsforge/issues/1095)
- `ThemeCallback.getColor` refactor [#912](https://github.com/mapsforge/mapsforge/issues/912)
- Parent tiles rendering quality option [#1102](https://github.com/mapsforge/mapsforge/pull/1102)
- `Parameters.PARENT_TILES_RENDERING`
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.11.0)
## Version 0.10.0 (2018-08-28)
- Mapsforge maps **v5**: custom tag keys [#1041](https://github.com/mapsforge/mapsforge/issues/1041)
- Read & render polygon label/symbol position [#1064](https://github.com/mapsforge/mapsforge/issues/1064)
- Map writer: polygon label/symbol centroid [#1061](https://github.com/mapsforge/mapsforge/issues/1061)
- POI: SQLite Android Bindings [#1079](https://github.com/mapsforge/mapsforge/issues/1079)
- POI: offline address search [#1063](https://github.com/mapsforge/mapsforge/issues/1063)
- POI writer: tag keys as categories [#1062](https://github.com/mapsforge/mapsforge/pull/1062)
- POI writer: latest Java compatibility [#1083](https://github.com/mapsforge/mapsforge/issues/1083)
- MyLocationOverlay implementation [#1035](https://github.com/mapsforge/mapsforge/issues/1035)
- Polyline / Polygon rendering optimizations [#1057](https://github.com/mapsforge/mapsforge/issues/1057)
- Tile sources with api keys [#1028](https://github.com/mapsforge/mapsforge/issues/1028)
- Render theme fallback internal resources [#1026](https://github.com/mapsforge/mapsforge/issues/1026)
- MapViewPosition interface [#1044](https://github.com/mapsforge/mapsforge/pull/1044)
- Android 9 compatibility [#1066](https://github.com/mapsforge/mapsforge/issues/1066)
- JTS (LocationTech) [#1027](https://github.com/mapsforge/mapsforge/issues/1027)
- SVG Salamander (JitPack) [#1078](https://github.com/mapsforge/mapsforge/issues/1078)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.10.0)
## Version 0.9.1 (2018-01-04)
- Gradle fix transitive dependencies [#1009](https://github.com/mapsforge/mapsforge/issues/1009)
- Deprecate mapsforge-map-android-extras [#1021](https://github.com/mapsforge/mapsforge/issues/1021)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.9.1)
## Version 0.9.0 (2017-12-03)
- Mapsforge maps **v5**: variable tag values [#1006](https://github.com/mapsforge/mapsforge/pull/1006)
- Mapsforge maps **v5**: implicit relations of building parts [#1014](https://github.com/mapsforge/mapsforge/pull/1014)
- Map frame buffer improvements [#977](https://github.com/mapsforge/mapsforge/issues/977)
- Hillshading improvements [#923](https://github.com/mapsforge/mapsforge/issues/923)
- Polyline overlay touch events [#998](https://github.com/mapsforge/mapsforge/issues/998)
- Polygon overlay touch events [#999](https://github.com/mapsforge/mapsforge/issues/999)
- Circle overlay touch events [#996](https://github.com/mapsforge/mapsforge/issues/996)
- MapFile supports FileChannel as input [#982](https://github.com/mapsforge/mapsforge/issues/982)
- XmlPullParser different implementations [#974](https://github.com/mapsforge/mapsforge/issues/974)
- Desktop: fix blurred map view [#978](https://github.com/mapsforge/mapsforge/issues/978)
- POI: **v2** with multiple categories [#950](https://github.com/mapsforge/mapsforge/issues/950)
- POI: multiple patterns in search [#988](https://github.com/mapsforge/mapsforge/issues/988)
- POI: add non-closed ways [#947](https://github.com/mapsforge/mapsforge/issues/947)
- POI: add geo tagging [#946](https://github.com/mapsforge/mapsforge/issues/946)
- POI: add named entities option [#949](https://github.com/mapsforge/mapsforge/issues/949)
- POI: fix multiple POI categories [#940](https://github.com/mapsforge/mapsforge/issues/940)
- Feature parameters [#994](https://github.com/mapsforge/mapsforge/issues/994)
- Writers: Osmosis 0.46 with protobuf 3 [#1002](https://github.com/mapsforge/mapsforge/issues/1002)
- Gradle 4 / Android plugin 3 support [#1009](https://github.com/mapsforge/mapsforge/issues/1009)
- Internal render themes various improvements [#857](https://github.com/mapsforge/mapsforge/issues/857)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.9.0)
## Version 0.8.0 (2017-03-18)
- Android fix hardware acceleration [#919](https://github.com/mapsforge/mapsforge/issues/919) [#613](https://github.com/mapsforge/mapsforge/issues/613)
- Hillshading from HGT digital elevation model data [#923](https://github.com/mapsforge/mapsforge/issues/923)
- Android tile cache folder option [#913](https://github.com/mapsforge/mapsforge/issues/913)
- Android SVG cache folder option [#914](https://github.com/mapsforge/mapsforge/issues/914)
- Desktop tile cache creation utility [#915](https://github.com/mapsforge/mapsforge/issues/915)
- Desktop MapView custom listeners [#935](https://github.com/mapsforge/mapsforge/issues/935)
- Map writer: multiple threads option (default 1) [#920](https://github.com/mapsforge/mapsforge/issues/920)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.8.0)
## Version 0.7.0 (2016-12-30)
- Multithreaded rendering improvements [#591](https://github.com/mapsforge/mapsforge/issues/591) [#806](https://github.com/mapsforge/mapsforge/issues/806)
- Fix map disappearance at large zoom levels [#572](https://github.com/mapsforge/mapsforge/issues/572)
- Map writer: polygon label position enhancements [#886](https://github.com/mapsforge/mapsforge/issues/886)
- Map writer: house numbers (nodes) include at zoom 17 [#895](https://github.com/mapsforge/mapsforge/issues/895)
- Map writer: simplification max zoom option [#892](https://github.com/mapsforge/mapsforge/issues/892)
- POI writer: allow empty categories option [#883](https://github.com/mapsforge/mapsforge/issues/883)
- Multiple maps with different zoom levels [#911](https://github.com/mapsforge/mapsforge/issues/911)
- Map rotation (external) in library [#637](https://github.com/mapsforge/mapsforge/issues/637)
- Group layer implementation [#860](https://github.com/mapsforge/mapsforge/issues/860)
- SVG symbols customization [#858](https://github.com/mapsforge/mapsforge/issues/858)
- Map scale bar size scaling [#861](https://github.com/mapsforge/mapsforge/issues/861)
- Group marker example [#905](https://github.com/mapsforge/mapsforge/issues/905)
- Deprecate water tiles rendering [#640](https://github.com/mapsforge/mapsforge/issues/640)
- mapsforge-themes module [#848](https://github.com/mapsforge/mapsforge/issues/848)
- New default internal render theme [#903](https://github.com/mapsforge/mapsforge/issues/903)
- Internal render themes new SVG resources [#904](https://github.com/mapsforge/mapsforge/issues/904)
- Render theme resources optional location prefixes [#847](https://github.com/mapsforge/mapsforge/issues/847)
- Render theme from input stream [#872](https://github.com/mapsforge/mapsforge/issues/872)
- SpatiaLite natives published artifacts [#849](https://github.com/mapsforge/mapsforge/issues/849)
- SNAPSHOT builds publish to Sonatype OSSRH [#873](https://github.com/mapsforge/mapsforge/issues/873)
- Deprecate Maven build [#852](https://github.com/mapsforge/mapsforge/issues/852)
- Deprecate CI server [#877](https://github.com/mapsforge/mapsforge/issues/877)
- Drop of `dev` branch
- Internal render themes various improvements [#857](https://github.com/mapsforge/mapsforge/issues/857)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.7.0)
## Version 0.6.1 (2016-06-11)
- [POI Search](POI.md) **v1** [#728](https://github.com/mapsforge/mapsforge/issues/728)
- Render Theme v5: pathText repeat options [#473](https://github.com/mapsforge/mapsforge/issues/473)
- Render Theme v5: scale options [#814](https://github.com/mapsforge/mapsforge/issues/814)
- Render Theme v5: deprecate 'symbol-scaling' option [#815](https://github.com/mapsforge/mapsforge/issues/815)
- Map writer improved area heuristics [#788](https://github.com/mapsforge/mapsforge/issues/788) [#795](https://github.com/mapsforge/mapsforge/issues/795)
- Reverse Geocoding example [#727](https://github.com/mapsforge/mapsforge/issues/727)
- LabelLayer enhanced implementation [#763](https://github.com/mapsforge/mapsforge/issues/763)
- Street name rendering improvements [#644](https://github.com/mapsforge/mapsforge/issues/644)
- Color filters in map rendering [#778](https://github.com/mapsforge/mapsforge/issues/778)
- Night mode example [#777](https://github.com/mapsforge/mapsforge/issues/777)
- Layers redraw option [#817](https://github.com/mapsforge/mapsforge/issues/817)
- Zoom level limits central handling [#646](https://github.com/mapsforge/mapsforge/issues/646)
- Simplified tile layer creation [#833](https://github.com/mapsforge/mapsforge/issues/833)
- Android gestures options [#705](https://github.com/mapsforge/mapsforge/issues/705)
- Java onTap layer listener [#774](https://github.com/mapsforge/mapsforge/issues/774)
- Online tile source enhancements [#823](https://github.com/mapsforge/mapsforge/issues/823)
- Diagnostic layers improvements [#821](https://github.com/mapsforge/mapsforge/issues/821)
- Android samples hardware acceleration preference [#825](https://github.com/mapsforge/mapsforge/issues/825)
- Library integration [documentation](Integration.md) [#781](https://github.com/mapsforge/mapsforge/issues/781)
- Jar with dependencies building [#767](https://github.com/mapsforge/mapsforge/issues/767)
- Sample applications reorganization [#724](https://github.com/mapsforge/mapsforge/issues/724)
- Code formatting improvements [#782](https://github.com/mapsforge/mapsforge/issues/782)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.6.1)
## Version 0.6.0 (2015-11-25)
- Mapsforge maps **v4**: multilingual names [#624](https://github.com/mapsforge/mapsforge/issues/624)
- Writer language improved parsing [#663](https://github.com/mapsforge/mapsforge/issues/663)
- MapDataStore extensibility [#668](https://github.com/mapsforge/mapsforge/issues/668)
- Android gestures total overhaul [#688](https://github.com/mapsforge/mapsforge/issues/688)
- Android gesture: fling [#219](https://github.com/mapsforge/mapsforge/issues/219)
- Android gesture: quick scale [#651](https://github.com/mapsforge/mapsforge/issues/651)
- Marker clustering example [#669](https://github.com/mapsforge/mapsforge/issues/669)
- BoundingBox enhancements [#660](https://github.com/mapsforge/mapsforge/issues/660)
- Path enhancements [#676](https://github.com/mapsforge/mapsforge/issues/676)
- Customizable zoom controls [#700](https://github.com/mapsforge/mapsforge/issues/700)
- Android View overlay [#680](https://github.com/mapsforge/mapsforge/issues/680)
- Simplification of MapView API [#662](https://github.com/mapsforge/mapsforge/issues/662)
- AWT library reorganization [#714](https://github.com/mapsforge/mapsforge/issues/714)
- XSD repositioning for online validation [#672](https://github.com/mapsforge/mapsforge/issues/672)
- Android 6 / SDK 23 / Runtime permission support [#704](https://github.com/mapsforge/mapsforge/issues/704)
- Map creation with coastlines [documentation](MapCreation.md)
- Fix invalid number of way nodes [#645](https://github.com/mapsforge/mapsforge/issues/645)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.6.0)
## Version 0.5.2 (2015-08-23)
- Multi-threaded map rendering [#73](https://github.com/mapsforge/mapsforge/issues/73)
- Hardware acceleration improvements [#613](https://github.com/mapsforge/mapsforge/issues/613)
- Touch gesture improvements and fixes [#616](https://github.com/mapsforge/mapsforge/issues/616)
- Scale gesture through focal point [#626](https://github.com/mapsforge/mapsforge/issues/626)
- Geographic grid layer improvements [#574](https://github.com/mapsforge/mapsforge/issues/574)
- Map writer tag-mapping improvements [#339](https://github.com/mapsforge/mapsforge/issues/339) [#586](https://github.com/mapsforge/mapsforge/issues/586)
- Render themes improvements [#608](https://github.com/mapsforge/mapsforge/issues/608) [#615](https://github.com/mapsforge/mapsforge/issues/615)
- Scale bar enhancements [#597](https://github.com/mapsforge/mapsforge/issues/597)
- Zoom controls enhancements [#598](https://github.com/mapsforge/mapsforge/issues/598)
- Map buffer size adjustable [#619](https://github.com/mapsforge/mapsforge/issues/619)
- MyLocationOverlay moved in Samples [#657](https://github.com/mapsforge/mapsforge/issues/657)
- External Map Rotation example improvements [#637](https://github.com/mapsforge/mapsforge/issues/637)
- LabelLayer improvements [#595](https://github.com/mapsforge/mapsforge/issues/595) [#639](https://github.com/mapsforge/mapsforge/issues/639) [#642](https://github.com/mapsforge/mapsforge/issues/642)
- Simplified cleanup operation [#620](https://github.com/mapsforge/mapsforge/issues/620)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aclosed+milestone%3A0.5.2)
## Version 0.5.1 (2015-03-18)
- Support for more general map data sources through [MapDataStore interface](MapDataStore.md)
- Persistent Caching.
- SVG rendering for Java with SVG Salamander
- Internal rendertheme (osmarender) using SVG symbols by default
- Resource memory/file cache: common clear methods
- Documentation updates.
- Various bug fixes.
- Geographic grid layer.
- External Map Rotation example in Samples.
## Version 0.5.0 (2014-12-08)
- Rendertheme V4.
- Scalebar now with the option of using two units at the same time. New unit: nautical.
- Line breaks in labels: this is the most fragile change at the moment as it does not play well with the label placement algorithm.
- Improved tile caching: bugs fixed and optional threading for better performance.
- TileStoreLayer using the standard TMS directory layout of zoomlevel/y/x.
- New SVG library having better compliance with SVG spec.
- New render theme xml parser for better performance.
- Caching of rendered SVG symbols & delayed rendering.
- Simplify map writer plugin installation in Osmosis.
- Fixes to Rendertheme V4 with most notably improved tiling of area shaders.
- Rendertheme V4: added display directive to force symbols to appear.
- Rendertheme V4: added optional map-background-outside to blank out non-map areas.
- Introduced MapViewerTemplate for easier development of Android apps and simplified the Android Samples app.
- Android Lollipop support, various upgrades to latest software, Java 8 (for maven only so far).
- Map Reader fix for long ways.
- Map Writer fix to clip multi-polygons and area detection.
- Cache calculation improvements.
- Changes to support the new standard for encoding land/sea area.
- Fix for #332 (invalid geometries in map writer).
- Fix for #549 (ordering of label drawing).
- Improved documentation integrated into git.
- Move to github.
## Version 0.4.3 (2014-05-10)
Version 0.4.X is what during a period was known as the 'rescue' branch. It is based on an extensive rewrite of the mapsforge library that is incompatible with the previous releases. The mapfile format however has not changed and map files from 0.3 can still be used.
- Better modular design of the entire project.
- Support for Java-only applications, see the SwingMapViewer subproject.
- Map views are not directly coupled to activities any more and can be used with modern Android design concepts.
- More flexible overlay model.
- Tightened-up memory handling.
- Support for device screen scaling.
- Support for SVG files as map icons.
- Gradle as build system in addition to Maven.
- Updated icons of default render theme.
- Available from Maven Central.
- Use mapsforge svg-android.
For a demonstration of the capabilities refer to the Samples app.
## Version 0.3.0 (2012-03-18)
- New version of the binary map file format, see [Specification Binary Map File](Specification-Binary-Map-File.md).
- New render theme API for custom map styles. ([issue 31](https://github.com/mapsforge/mapsforge/issues#issue/31))
- Allow for custom tile download classes. ([issue 204](https://github.com/mapsforge/mapsforge/issues#issue/204))
- Position of the zoom controls is now configurable. ([issue 155](https://github.com/mapsforge/mapsforge/issues#issue/155))
- The map scale bar supports metric and imperial units. ([issue 167](https://github.com/mapsforge/mapsforge/issues#issue/167))
- A preferred language can now be set for the map-writer. ([issue 90](https://github.com/mapsforge/mapsforge/issues#issue/90))
- Introduced maven as build system for the mapsforge project.
- Major refactoring of the package structure in the map library.
- Moved the map-reader code to a new, Android-independent subproject.
- Minor improvements and bug fixes.
## Version 0.2.4 (2011-06-28)
- AdvancedMapViewer now supports all location providers.
- Snap to position can be toggled if current position is shown.
- Support for multi-polygons in Overlay API.
- Support for long press events in Overlay API.
- Added metadata API for map files.
- Minor improvements and bug fixes.
## Version 0.2.3 (2011-05-12)
- License change from GPL3 to LGPL3.
- Added animations to the MapView when zooming in and out.
- The text size of the map renderer can be adjusted at runtime.
- Rendering of symbols along ways, used for example on one-way roads.
- The maximum zoom level of the MapView may now be set at runtime.
- Minor improvements and bug fixes.
## Version 0.2.2 (2011-03-22)
- Improved the overlay API and implemented some new classes.
- Better rendering of water areas and coastline situations.
- The tag list of the mapfile-writer can now be configured via an XML file.
- Added the possibility to render areas with a background pattern.
- Integrated support for piste maps features.
- Added a method to take a screenshot of the currently displayed map.
- The minimum zoom level of the MapView may now be set at runtime.
- Started to make the map tile cache on the memory card persistent.
- Minor improvements and bug fixes.
## Version 0.2.1 (2011-02-10)
- Optimized binary map format, reduces the file size by 15-20%.
- Rewritten overlay implementation with many new features and bug fixes.
- Zoom level can now be changed by multi-tap and double-tap gestures.
- The mapfile-writer supports hard disk as temporary storage device.
- The mapfile-writer depends no longer on the JTS library and works faster.
- Added support for a couple of OpenStreetMap tags.
- Better rendering of way names.
- Better rendering of coastline and water areas.
- Minor improvements and bug fixes.
## Version 0.2.0 (2010-11-22)
- New binary map format for more detailed and faster map rendering.
- Overlay API to display points, ways and polygons on top of the map.
- Better label and symbol placement with collision avoidance.
- The MapView now supports multi-touch and new tile download modes.
- First release of the Osmosis plugin to generate binary map files.
- Minor improvements and bug fixes.
## Version 0.1.0 (2010-06-27)
- First public release, contains the android.map package.
mapsforge-0.20.0/docs/Contributors.md 0000664 0000000 0000000 00000000465 14466627326 0017550 0 ustar 00root root 0000000 0000000 The Mapsforge project was jointly founded by **Thilo Mühlberg** and **Jürgen Broß**. Both remain owners of the project but have retired as active developers.
**Ludwig Brinckmann** revived the project in version 0.4.X.
Current owner and lead developer is:
- [**devemux86**](https://github.com/devemux86)
mapsforge-0.20.0/docs/Desktop.md 0000664 0000000 0000000 00000001205 14466627326 0016455 0 ustar 00root root 0000000 0000000 ### Desktop
To run the desktop samples can use the Gradle `run` task.
Can change the [mainClassName](../mapsforge-samples-awt/build.gradle) to run each sample and pass args:
```groovy
./gradlew :mapsforge-samples-awt:run -Pargs=/path/to/map
```
To create a standalone executable jar, adapt the main class in [build gradle](../mapsforge-samples-awt/build.gradle), then run:
```groovy
./gradlew :mapsforge-samples-awt:fatJar
```
The jar file can be found in `build/libs` folder. Depending on the main class, pass args on execution via command line:
```
java -jar mapsforge-samples-awt-master-SNAPSHOT-jar-with-dependencies.jar /path/to/map
```
mapsforge-0.20.0/docs/Getting-Started-Developers.md 0000664 0000000 0000000 00000007210 14466627326 0022161 0 ustar 00root root 0000000 0000000 # Getting Started
**A quick description for developers of how to get started with mapsforge.**
This article describes how to build the mapsforge project and libraries from scratch and how developers should start working.
## Checkout the code
The mapsforge code is now **only** at https://github.com/mapsforge/mapsforge. The old repositories are not maintained anymore.
## Components
Mapsforge consists of the following core components:
- mapsforge-core: platform unspecific general components and interfaces.
- mapsforge-map: platform unspecific elements used for map display.
- mapsforge-themes: internal render themes collection.
- mapsforge-map-reader: platform unspecific code to read mapsforge map files.
- mapsforge-poi: platform unspecific poi elements.
- [kXML2](http://www.kxml.org/): lightweight XML parser for render themes.
Extra Android components:
- mapsforge-map-android: android specific map elements.
- mapsforge-poi-android: android specific poi elements.
- [androidsvg](http://bigbadaboom.github.io/androidsvg/): SVG library for displaying SVG files as icons.
Extra Java components:
- mapsforge-map-awt: a Java-only library to display mapsforge maps.
- mapsforge-poi-awt: java specific poi elements.
- [svg-salamander](https://github.com/blackears/svgSalamander): SVG library for displaying SVG files as icons.
- [xerial/sqlite-jdbc](https://github.com/xerial/sqlite-jdbc): SQLite JDBC Driver.
### Branches
The mapsforge code has now been consolidated into a main branch as well as releases:
- **master**: use this if you want the latest development features and can live with some instability.
- **release**: use this if you want to build applications on top of well-tested and stable code.
Code before latest release is not supported anymore (we do not have the resources to do this) and if you are starting development with mapsforge, its use is strongly discouraged.
## Development Applications
### mapsforge-samples-android
The Samples app, in mapsforge-samples-android, is a sample app for Android demonstrating mapsforge capabilities and a good starting point if you want to develop your own mapsforge-based app.
- The Samples app in mapsforge-samples-android is meant as a template and test case for building apps based on this version.
- There is now a MapViewerTemplate class for building Android apps, that gives simple hooks to implement an Android based application. For its use refer to the Samples app.
- After a successful build, you will find the Samples apk in mapsforge-samples-android/build/outputs/apk
- To run the Samples app, you will need to install any map called 'berlin.map' onto the sdcard of a device or emulator.
### mapsforge-samples-awt
The mapsforge-samples-awt is a simple Java only app useful for testing maps.
## Building Mapforge
### Building mapsforge with Gradle
Gradle is the new build system favoured by Google for Android builds. Android Studio, the new IDE provided by Google for building Android apps, integrates nicely with Gradle. We use the Gradle Wrapper script, which also installs the required version of Gradle.
After checking out the code, a build from the command line should be as easy as
./gradlew clean build
If you want to skip the tests, run
./gradlew clean assemble
After the build completes successfully you will find the Samples app in the directory mapsforge-samples-android/build/outputs/apk. Currently the build results in unsigned apks.
### Start developing with Android Studio
Android Studio integrates tightly with gradle. The easiest way to create a new application is to follow the example of the Samples app.
## How to contribute
[Guidelines](CONTRIBUTING.md) for repository contributors. mapsforge-0.20.0/docs/Getting-Started-Map-Writer.md 0000664 0000000 0000000 00000033015 14466627326 0022042 0 ustar 00root root 0000000 0000000 # Mapsforge Map-Writer
The Mapsforge Map-Writer is a plug-in for the OpenStreetMap Osmosis Tool to convert OSM data files into maps that can be displayed with mapsforge.
This documentation is intended for those who want to create map files for use with mapsforge.
## Introduction
This document describes the mapsforge map-writer plugin. It allows to convert OpenStreetMap data into the .map format which is needed to display maps with mapsforge-based applications. The tool is implemented as a plugin to the [Osmosis](http://wiki.openstreetmap.org/wiki/Osmosis) software. To use the tool, you are required to have a working installation of Osmosis and the writer plugin copied to the plugins directory of Osmosis. You should also be familiar with the Osmosis tool.
The mapsforge writer has not changed significantly from version 0.3 and files generated with either version can be loaded into mapsforge applications 0.4.+
## Plugin Usage
- Activate the plugin with the Osmosis parameter ‘--mapfile-writer’, or short ‘--mw’.
- The plugin requires an input stream of valid OSM data. Use for example the MySQL, PostGIS, XML or PBF-Binary tasks of Osmosis to read OSM data.
- Use the following optional parameters to configure the process of map creation:
### Basic Options
|**Option**|**Description**|**Valid Values**|**Default Value**|
|----------|---------------|----------------|-----------------|
|`file`|path to the output file, the file will be overwritten if existent||mapsforge.map|
|`type`|switch for main memory or hd mode|ram, hd|ram|
|`bbox`|bounding box definition as comma-separated list of coordinates in the form: minLat,minLon,maxLat,maxLon (be aware that osmosis does not allow **white space** in its command line parameters)|minLat, minLon, maxLat, maxLon in exactly this order as degrees|(blank)|
|`map-start-position`|write a start position to the file which is used, when the file is first opened in the MapViewer|latitude, longitude in degrees|(blank)|
|`map-start-zoom`|write a start zoom level to the file which is used, when the file is first opened in the MapViewer|zoom level as integer in [0, 21]|(blank)|
|`preferred-languages`|
If not specified, only the default language with no tag will be written to the file.
If only one language is specified, it will be written if its tag is found, otherwise the default language will be written.
If multiple comma separated languages are specified, the default language will be written, followed by the specified languages (if present and if different than the default). (**v4**)
|language code as defined in ISO 639-1 or ISO 639-2 if an ISO 639-1 code doesn't exist|(blank)|
|`tag-values`|enable usage of variable tag values, color strings and hex codes. (**v5**)|true/false|false|
|`comment`|writes a comment to the file||(blank)|
|`progress-logs`|enable progress logs|true/false|true|
### Advanced Options (only use when you know what you are doing)
|**Option**|**Description**|**Valid Values**|**Default Value**|
|----------|---------------|----------------|-----------------|
|`tag-conf-file`|path to an XML file that customizes the definition which OSM-tags are recognized|path to an XML file, please read section 'Defining a Custom Tag Mapping via XML' carefully before using thsi parameter|(blank) internal default tag mapping is used|
|`polygon-clipping`|use polygon clipping to reduce map file size (minimal performance overhead)|true/false|true|
|`way-clipping`|use way clipping to reduce map file size (minimal performance overhead)|true/false|true|
|`label-position`|compute label/symbol position for polygons that cover multiple tiles|true/false|false|
|`polylabel`|use in `label-position` calculation:
|false|
|`simplification-factor`|simplifies ways and polygons with a topology preserving algorithm similar to the Douglas Peucker algorithm, using as the maximum distance difference value the given simplification factor (evaluated in pixels on max zoom level of a base zoom level); on base zoom levels higher than 12, no simplification is computed|positive real number|2.5|
|`simplification-max-zoom`|The maximum base zoom level for which we apply a simplification algorithm to filter way points|positive integer|12|
|`bbox-enlargement`|amount of meters used for enlarging bounding boxes in computations|positive integer|20|
|`zoom-interval-conf`|configure the zoom intervals used in this file, configuration is given in the form: baseZoomA, minZoomA, maxZoomA, baseZoomB, minZoomB, maxZoomB,..., baseZoomN, minZoomN, maxZoomN, in most cases you do **not** need to alter the standard configuration|intervals must not overlap and must not contain gaps|5,0,7,10,8,11,14,12,21|
|`threads`|use multiple threads to increase performance (possible OOM)|positive integer|1|
|`debug-file`|switch for writing debug information to the file, _do **not activate** this option unless you know what you are doing_|true/false|false|
### Examples
- Write map file for Berlin using Binary-PBF format and writing into file /tmp/berlin.map: `$ bin/osmosis --rb file=../data/berlin.osm.pbf --mapfile-writer file=/tmp/berlin.map`
- Write map file for Germany using Binary-PBF format and writing into file /tmp/germany.map, setting the processing mode to hard disk: `$ bin/osmosis --rb file=../data/germany.osm.pbf --mapfile-writer file=/tmp/germany.map type=hd`
- Write map file for Bremen using XML format and writing into file /tmp/bremen.map, setting map start position to Bremen HBF: `$ bin/osmosis --rx file=../data/bremen.osm --mapfile-writer file=/tmp/bremen.map map-start-position=53.083418,8.81376`
- Write map file for Berlin-Dahlem. Data has been exported as XML from OSM website, so that we must use a bounding box definition: `$ bin/osmosis --rx file=../data/dahlem.osm --mw file=/tmp/dahlem-high.map bbox=52.4477300,13.2756600,52.4588200,13.2986600 `
### Known Pitfalls
- The plugin requires a bounding box definition, which is either included in the data or is given via the command line parameter `bbox`. Take note that the XML export functionality of the OSM website currently produces invalid bounding box definitions, so that the `bbox` parameter must be used in this case.
- If you installed the plugin into the user home, please make sure that you run osmosis with exactly this user and not with another user (e.g. the root user).
- There is a potential issue with tile grid artifacts inside areas at zoom levels 12-13, specially if they have stroke or semi-transparent fill. To solve this you can try adding `force-polygon-line="true"` in the tag-mapping or a different zoom interval:
```bash
zoom-interval-conf=5,0,7,10,8,11,12,12,13,14,14,21
```
## Plugin Installation
- Download the release or snapshot writer plugin (**jar-with-dependencies**) from [Maven Central](https://repo1.maven.org/maven2/org/mapsforge/) or [Sonatype OSS Repository Hosting](https://oss.sonatype.org/content/repositories/snapshots/org/mapsforge/) and read the Osmosis [documentation](http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage#Plugin_Tasks) for how to install a plugin.
- You may want to increase the Java heap space that may be allocated for osmosis. You can do so by editing the script $OSMOSIS_HOME/bin/osmosis(.bat). Insert a line with 'JAVACMD_OPTIONS=-Xmx800m'. This sets the maximum available Java heap space to 800M. Of course you can set this parameter to a value which ever fits best for your purpose.
- See http://wiki.openstreetmap.org/wiki/Osmosis/Installation for further information about Osmosis usage.
### Installation Example
- Let the home directory of the user ($USER_HOME) be "/home/prometheus/".
- Let the directory where osmosis has been extracted to ($OSMOSIS_HOME) be "/home/prometheus/development/osm/osmosis/osmosis-0.40.1/".
- Create the directory "/home/prometheus/.openstreetmap/osmosis/plugins/" and copy the mapsforge-map-writer-x.x.x.jar to this directory.
### Hardware Requirements
The currently realeased version of the map-writer gives you the choice of either processing the input data completely in main memory or using the hard disk for storing temporary data structures. You can switch between these processing modes by using the 'type' parameter, see Plugin Usage below.
We recommend using the main memory mode only for small input files (< 200 MB in PBF format) as it requires quite a huge amount of memory (about ten times the size of the input file).
## Land/Sea Feature Encoding
For a minimum compatibility of maps generated, the following standard for encoding land and sea areas is suggested:
- either have a single sea polygon at the bottom or more complex sea polygons (this is really up to map makers to decide, the single sea polygon is smaller in the map file but has the effect of some double drawing), tag natural=sea
- define land areas with tag natural=nosea
- everything else
It is encouraged to include land/sea areas for the entire bbox of the map (so even if the real map data covers just one irregularly shaped polygon, the land/sea should be for the whole bbox), the overhead is often not great and the result looks much better on maps.
The old practice of implicitly assuming that the background is land-coloured and not defining land areas is deprecated.
## Defining a Custom Tag Mapping via XML
This section describes how to configure the ***known tag set*** via an XML file. The *known tag set* comprises all OSM tags (for ways and POIs) that are known to the renderer. You can use the XML configuration to define which subset of the known tag set should be included in the map file and to configure the zoom levels on which map objects first appear.
The default internal tag mapping defined in https://github.com/mapsforge/mapsforge/blob/master/mapsforge-map-writer/src/main/config/tag-mapping.xml is kept in sync with the known tag set of the renderer. So, if you want to define your own custom mapping use the internal mapping as a reference.
Please consult the XML-Schema documentation of https://github.com/mapsforge/mapsforge/blob/master/resources/tag-mapping.xsd to learn about how to implement your custom mapping. The XML-Schema is very easy to understand. We recommend to use Eclipse as an editor for XML as it allows for auto-completion if you provide an XML-Schema.
You need to be aware that this configuration only defines what data is to be included in the map file. How the data is eventually rendered is specified by a rule-set that is attached to the renderer. So if you add any tag to the writer’s tag configuration that is not recognized by the renderer, it will not be displayed in the map. In this case, you have to make sure that you also define in which way the new tag is to be rendered. How to configure the rendering is described in the article.
## Changelog
### 0.10.0
- Polygon label/symbol centroid
### 0.9.0
- Variable tag values (**v5**)
- Osmosis 0.46 with protobuf 3
### 0.8.0
- Multiple threads option (default 1)
### 0.7.0
- Polygon label position enhancements
- House numbers (nodes) include at zoom 17
- Simplification max zoom option
### 0.6.1
- Add all tags from OSM wiki to area heuristics
- Minor changes to tag-mapping.xml (place=locality)
### 0.6.0
- Multilingual maps (**v4**)
- Language improved parsing
- Fix invalid number of way nodes
### 0.5.2
- Minor changes to tag-mapping.xml (administrative boundaries, national parks)
### 0.5.1
- No significant changes
### 0.5.0
The mapfile format has not changed in 0.5.0, but the creation process has changed somewhat and it is recommended to use the latest version of the map file writer.
- The encoding of multi-polygons is now much more efficient as multi-polygons are clipped to tile boundaries. Previous versions resulted in very large files that then triggered OOM situations in the map file reader.
- Some smaller changes to the tag-mapping.xml (remove trees, duplicates).
- Heuristics to only encode certain ways as areas.
### 0.4.0
There are no significant changes in 0.4.0 and the mapfile format has not changed.
- Small adjustments in the tag-mapping.xml configuration
- Updates to run with Osmosis 0.4.3.
### 0.3.0
- implements new binary format version 3
- improved handling of multi-polygons and relations
- improved clipping of polygons and lines (ways)
- more efficient encoding of coordinates
- supports definition of preferred language
- many other improvements and bug fixes
### 0.2.4
- minor improvements and bugfixes
### 0.2.3
- minor improvements and bugfixes
### 0.2.2
- improved coast line handling: detects tiles that are completely covered by water and marks them as such in the binary file
- the tag list of the map-writer can now be configured via an XML file, please read section 'Defining a Custom Tag Mapping via XML' carefully and see the new option 'tag-conf-file' below
- computes the distribution of tags in the input file and based on this assigns internal ids in an optimized fashion, reduces file size
- polygon clipping is more restrictive due to a conceptual problem with clipping outlined (instead of filled) polygons, increases file size (admittedly overcompensates file size reduction mentioned above)
- bug fixes
### 0.2.1
- supports hard disk as temporary storage device, reduces required amount of main memory significantly, see Hardware Requirements below
- support for MS Windows platform
- removed dependency on JTS library
- writes new file format v2, reduces file sizes about 20%, see SpecificationBinaryMapFile
- bug fixes
mapsforge-0.20.0/docs/ISSUE_TEMPLATE.md 0000664 0000000 0000000 00000000107 14466627326 0017227 0 ustar 00root root 0000000 0000000 For questions, reports and feature requests please use the Discussions. mapsforge-0.20.0/docs/Integration.md 0000664 0000000 0000000 00000004554 14466627326 0017341 0 ustar 00root root 0000000 0000000 # Integration guide
This article describes how to integrate the library in your project, with Gradle / Maven / Jars or SNAPSHOT builds.
Current version is [](https://repo1.maven.org/maven2/org/mapsforge/)
## Gradle
### Map
#### Core
```groovy
implementation 'org.mapsforge:mapsforge-core:[CURRENT-VERSION]'
implementation 'org.mapsforge:mapsforge-map:[CURRENT-VERSION]'
implementation 'org.mapsforge:mapsforge-map-reader:[CURRENT-VERSION]'
implementation 'org.mapsforge:mapsforge-themes:[CURRENT-VERSION]'
```
#### Android
```groovy
implementation 'org.mapsforge:mapsforge-map-android:[CURRENT-VERSION]'
implementation 'com.caverock:androidsvg:1.4'
```
#### Desktop
```groovy
implementation 'org.mapsforge:mapsforge-map-awt:[CURRENT-VERSION]'
implementation 'guru.nidi.com.kitfox:svgSalamander:1.1.3'
implementation 'net.sf.kxml:kxml2:2.3.0'
```
### POI
#### Core
```groovy
implementation 'org.mapsforge:mapsforge-core:[CURRENT-VERSION]'
implementation 'org.mapsforge:mapsforge-poi:[CURRENT-VERSION]'
```
#### Android
```groovy
implementation 'org.mapsforge:mapsforge-poi-android:[CURRENT-VERSION]'
```
#### Desktop
```groovy
implementation 'org.mapsforge:mapsforge-poi-awt:[CURRENT-VERSION]'
implementation 'org.xerial:sqlite-jdbc:3.28.0'
```
## Snapshots
We publish SNAPSHOT builds to Sonatype OSS Repository Hosting.
You need to add the repository:
```groovy
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
```
And declare the dependencies like:
```groovy
implementation 'org.mapsforge:mapsforge-core:master-SNAPSHOT'
...
```
For checking latest snapshot on every build:
```groovy
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
```
## Maven
The dependencies for Maven are declared in a similar way. For example:
```xml
org.mapsforgemapsforge-core[CURRENT-VERSION]
```
## Jars
You can find release and snapshot jars (regular and with dependencies) in [Maven Central](https://repo1.maven.org/maven2/org/mapsforge/) and [Sonatype OSS Repository Hosting](https://oss.sonatype.org/content/repositories/snapshots/org/mapsforge/).
Third party jars can be found at their respective sites or in Maven Central repository.
mapsforge-0.20.0/docs/LabelLayer.md 0000664 0000000 0000000 00000014755 14466627326 0017076 0 ustar 00root root 0000000 0000000 The New Label Layer
===================
The new LabelLayer is responsible for drawing labels and icons onto a map. This effectively splits the responsibility of drawing a map into the TileRendererLayer, which will now only draw ways and areas (essentially items that will appear the same when a map is rotated), and the LabelLayer which will draw labels, road-names and icons (everything that needs to have a fixed angle relative to the screen).
Problems in 0.4.x
-----------------
In the current, 0.4.x, we have have a couple of issues, that are either unresolvable with the current approach or the implementation has so many problems that they are difficult to solve without a complete rewrite. More specifically:
* No support for map rotation. Since labels were drawn at a fixed angle onto a tile, rotating the tile would also rotate the labels.
* Complex implementation: since labels were drawn onto tiles, it had to be carefully where labels overlapped tile boundaries. In these cases, labels had to be drawn onto adjacent tiles. The implementation for this was very complex and had several errors, most notably that it could not account for tiles being purged from a cache and redrawn. One result were labels wrongly clipped at tile boundaries.
* Overwriting for parallel roads: the label placement algorithm was not applied to roads, resulting in road names overwriting each other.
* No priority, a random first-come/first-serve algorithm for label placement, often obscuring more important place names.
* A related problem in the TileRendererLayer is that through the extensive use of local variables it is impossible to multi-thread that layer.
The new approach
----------------
* Labels are drawn separately and directly onto the canvas. This will make it possible to rotate the underlying tiles and keep labels horizontal. Rotation is not yet implemented, but the new implementation goes a long way towards supporting map rotation.
* Labels are not tiled anymore, therefore clipping at tile boundaries has been eliminated and the complex accounting for tile dependencies could be removed.
* Road labels are now part of the placement algorithm.
* There is now a priority element on captions, symbols, line-symbols and pathtestext. The higher the priority, the earlier the element is drawn onto the map, ensuring that labels with higher priority are visible.
* In the DatabaseRenderer a number of local variables have been removed. This work is not yet complete, but it is a step towards multi-threading here.
As with other changes introduced, this is an incremental change that leaves user code as much unaffected as possible, but it also makes the implementation a little tricky.
* The labels are retrieved from the map database in a tile by tile fashion. There is no way to retrieve labels by location. And as every single item has to be passed through the rendertheme mechanism this retrieval is relatively expensive.
* The labels need to be redrawn for every redraw of the map. No everything can be done on the main UI thread. Computing the label placement is relatively expensive.
The new implementation addresses this in the following way:
* All map elements to be placed on the LabelLayer are derived from MapElementContainer in mapsforge-core. Technically, this should go into mapsforge-map, but for the PointTextContainer we need different implementations for Android/Awt, which requires a factory method through the GraphicFactory. A MapElementContainer knows how to draw itself onto the Canvas.
* Label retrieval hooks into the retrieval by the TileRendererLayer that was previously responsible for drawing the labels. This eliminates a double reading of the map file -- however, at the expense of some complex operations.
* The label data is then stored in the TileBasedLabelStore, a LRU cache that is organized according to tiles.
* The TileBasedLabelStore precomputes the layout for the last requested area. This assumes that the area does not change very often, as it is the case with usual map panning.
* Whenever the visible tile set changes, the LayoutCalculator thread recomputes the layout and, when finished, requires the LayerLabel to be redrawn.
Notes for users
===============
TileRendererLayer:
------------------
The TileRendererLayer now takes an additional argument of the TileBasedLabelStore, which receives the labels that the DatabaseRenderer produces. Alongside the TileRendererLayer we need the LabelLayer.
```java
protected void createLayers() {
TileRendererLayer tileRendererLayer = AndroidUtil.createTileRendererLayer(this.tileCaches.get(0),
this.mapView.getModel().mapViewPosition, getMapFile(), getRenderTheme(), false, false, true);
mapView.getLayerManager().getLayers().add(tileRendererLayer);
LabelLayer labelLayer = new LabelLayer(AndroidGraphicFactory.INSTANCE, tileRendererLayer.getLabelStore());
mapView.getLayerManager().getLayers().add(labelLayer);
}
```
If you do not want any labels, pass null for the TileBasedLabelStore to the TileRendererLayer.
Rendertheme Change:
-------------------
The priority attribute has been added to caption, pathText, lineSymbol and symbol. The default priority is 0, higher priorities are rendered first, lower priority elements later if space is still available.
Remaining Problems:
-------------------
* Memory as usual: mapsforge sails close to OOM all the time and keeping the label data for all the visible tiles in memory can cause an app to OOM. Finding the right balance is difficult.
Notes for Rotation:
-------------------
This is only one step towards a proper map rotation.
One of the issues is that the calculation of the layout is quite expensive. For that reason it is precomputed in a separate thread, rather than on the UI thread. However, for rotation tis layout has to be done for every change in rotation as different labels will clash. This introduces some instability in the label layout as with different rotations different labels will be drawn.
A different approach would be to calculate the maximum radius of a label and assume it is actually not rectangular, but circular. That way the layout would not change with rotation and could be done only once for a set of tiles. It would also mean that the overlap of labels could be computed quicker: it is only combined radius < distance. With line-breaking labels that would be possible.
It might also be that at the moment the center point of labels to the left/right/below/above symbols are calculated wrong and will not be correct for rotating maps.
mapsforge-0.20.0/docs/MapCreation.md 0000664 0000000 0000000 00000015145 14466627326 0017256 0 ustar 00root root 0000000 0000000 # Map creation (with coastlines)
**For an automated process using Geofabrik see new [mapsforge-creator](https://github.com/mapsforge/mapsforge-creator).**
Processing of coastlines was part of Mapsforge rendering engine, running live on (mobile) devices. Since many versions ago it was removed, so that all coastline processing can take place in advance as part of map creation.
The workaround requires no real changes to the map-writer nor the map-reader, as it just uses the render theme mechanism.
## Land
First of all we need a good set of either land or sea areas. OSM data does not natively have this as coastlines, as opposed to all other data for areas, are just lines. The main OSM renderers all employ some sort of intermediate processing to get the sea and land areas right.
We're using the dataset that Jochen Topf has provided on the [OpenStreetMap Data](https://osmdata.openstreetmap.de/) site, specifically the set: https://osmdata.openstreetmap.de/download/land-polygons-split-4326.zip (the non split version could also work).
We cut the data down a bit, using [ogr2ogr](http://www.gdal.org/ogr2ogr.html) with the bounds for the desired map:
```bash
ogr2ogr -overwrite -progress -skipfailures -clipsrc $LEFT $BOTTOM $RIGHT $TOP land.shp land-polygons-split-4326/land_polygons.shp
```
This produces, depending on the bounds, a much smaller coastline shapefile. We usually extend the boundaries of this file a bit over the actual area for the map, to make sure we don't get any funny cut-offs.
Then we convert the resulting shapefile with [shape2osm.py](https://github.com/mapsforge/mapsforge-creator/blob/master/shape2osm.py) (Python 3.x) and slight modifications (as are always required with shape2osm). We have set:
```python
fixed_tags = {
'natural': 'nosea',
'layer': '-5'
}
```
which will attach this tag to all polygons. We also changed the starting id for the OSM ids, as otherwise there is chance of collision with real OSM ids, which will create strange artifacts, like lines running through the map. We also changed the setting for the maximum length of ways, which does not seem to cause a problem.
```bash
python3 shape2osm.py -l land land.shp
```
We now have `land1.osm`, an OSM XML file with land represented as polygons with the tag "natural" -> "nosea".
## Sea
For the sea we create an osm file with a rectangle having the bounds of the map:
```xml
```
We now have `sea.osm`, an OSM XML file with sea represented as polygons with the tag "natural" -> "sea".
## Merge
The following steps could be taken in one, but we separated them out (a testing legacy).
We merge the resulting osm files of the land polygons and sea rectangle with our real osm data file:
```bash
$OSMOSIS_HOME/bin/osmosis --rb file=data.pbf --rx file=sea.osm --s --m --rx file=land1.osm --s --m --wb file=out.pbf omitmetadata=true
```
## Map writer
out.pbf can now be fed into the map-writer:
```bash
$OSMOSIS_HOME/bin/osmosis --rb file=out.pbf --mw file=out.map bbox=$BOTTOM,$LEFT,$TOP,$RIGHT map-start-position=$LAT,$LON map-start-zoom=$ZOOM
```
The bounding box parameters are now those for the desired map, this will cut off any excess land polygons.
For this to work correctly, only the tag-mapping.xml file needed to be modified by adding:
```xml
```
This ensures that the new land polygons and sea rectangle areas are included in the resulting file.
Note: The default tag-mapping.xml included in map-writer has already these rules.
This finishes the map creation process.
## Render theme
On the reader side, the only change required is to display the land areas correctly by changing the render theme:
```xml
```
The first change is to paint the map on a sub white background. Additionally the outside area can be painted on a light grey background.
The 1st rule, at the very top of the file, makes sure all the sea areas get painted first, here in some sort of blue.
The 2nd rule, makes sure all the nosea areas get painted immediately after the sea, here in sub white.
Note: Our provided render themes have already these rules.
With the above procedure complicated coastline areas are all now rendered correctly.
# World map creation
We use land polygons from [OpenStreetMap Data](https://osmdata.openstreetmap.de/), specifically the https://osmdata.openstreetmap.de/download/simplified-land-polygons-complete-3857.zip variant.
The process is completed successfully in some minutes giving the map in our [server](https://download.mapsforge.org/maps/world/).
Alternatively the non simplified variants can be used too.
To convert shp files in osm / pbf format there are many [tools](http://wiki.openstreetmap.org/wiki/Software_comparison/Import_a_shapefile) available.
Then run Osmosis with map-writer:
```bash
$OSMOSIS_HOME/bin/osmosis --rb file=world.pbf --mapfile-writer file=world.map map-start-position=0,0 map-start-zoom=5 zoom-interval-conf=5,0,7
```
We can also add a [TagTransform](http://wiki.openstreetmap.org/wiki/Osmosis/TagTransform) step in the process, if we want to transform the initial land tags to Mapsforge recognizable ones, like `natural=nosea`.
And we can put at the bottom a rectangle with world bounds and `natural=sea`, painting it blue (like described above).
mapsforge-0.20.0/docs/MapDataStore.md 0000664 0000000 0000000 00000007131 14466627326 0017374 0 ustar 00root root 0000000 0000000 # The MapDataStore Interface
An introduction to the new MapDataStore interface.

Mapsforge can use different sources to render map data. The most common is a MapFile, as generated by the Mapsforge [Map Writer](Getting-Started-Map-Writer.md). To widen the source of map data, a new interface has been factored out, the MapDataStore.
### MapDataStore Interface
```java
public interface MapDataStore {
/**
* Returns the area for which data is supplied.
* @return bounding box of area.
*/
BoundingBox boundingBox();
/*
* Closes the map database.
*/
void close();
/**
* Gets the initial map position.
* @return the start position, if available.
*/
LatLong startPosition();
/**
* Gets the initial zoom level.
* @return the start zoom level.
*/
Byte startZoomLevel();
/**
* Reads data for tile.
* @param tile tile for which data is requested.
* @return map data for the tile.
*/
MapReadResult readMapData(Tile tile);
/**
* Returns true if MapDatabase contains tile.
* @param tile tile to be rendered.
* @return true if tile is part of database.
*/
boolean supportsTile(Tile tile);
}
```
### MapFile
Previously known as MapDataBase, the MapFile is the most common incarnation of the MapDataStore interface. It simply wraps a file system map file, to supply the required operations.
### MultiMapDataStore
A MultiMapDataStore allows to combine multiple MapDataStores into one. Previously, something similar was only possible by rendering tiles in different layers, which is quite expensive as each layer takes up memory.
When a tile is rendered with from a MultiMapDataStore, the data from the included MapDataStores is combined and only a single layer is rendered. This implies that the same render theme is being used for all.
To combine the data from the different stores, several policies are supported:
```java
public enum DataPolicy {
RETURN_FIRST,
RETURN_ALL,
DEDUPLICATE
}
```
- RETURN_FIRST will only render data from the first source that has data for a tile. This is useful if the stores are known not to overlap in their coverage or where it is enough to render data from the first store if they overlap.
- RETURN_ALL will combine the data from all stores. This is the most useful policy if the MultiDataStore is used to combine multiple maps into one.
- DEDUPLICATE will use data from all stores, but eliminate duplicates. Testing has shown that it is more costly to eliminate duplicates and generally cheaper to render overlapping data twice.
## An Example
In the Samples app, the MultiMapLowResWorld class shows an example for the use of the MultiMapDataStore to combine a low-res world file that contains only land/sea areas with a more detailed map view for a specific area.
```java
multiMapDataStore = new MultiMapDataStore(MultiMapDataStore.DataPolicy.RETURN_ALL);
multiMapDataStore.addMapDataStore(getMapFile1(), true, true);
multiMapDataStore.addMapDataStore(getMapFile2(), false, false);
```
The parameters for the addMapDataStore call specify which initial start position and start zoom level should be used for the combined area.

## Advanced Use
- Since the MultiMapDataStore itself implements the MapDataStore interface, complex maps can be built up that use different DataPolicies.
- It is possible to wrap a user supplied data base in this interface, so data supplied by e.g. a Spatialite DB can be directly integrated into the rendering process.
### TODO
Currently, the bounding box for a MultiMapDataStore is the combined bounding box of all individual stores. Maybe this needs some refinement.
mapsforge-0.20.0/docs/Mapsforge-Applications.md 0000664 0000000 0000000 00000020401 14466627326 0021412 0 ustar 00root root 0000000 0000000 # Applications using mapsforge software (in lexical order)
|**Name**|**Type**|**License/Cost**|**Sources**|
|--------|--------|----------------|-----------|
| [AAT](https://bailu.ch/aat) | GPS tracking for activities | GPL3/Free | Open |
| [AlaMesa](http://www.alamesacuba.com/en/products/apps/) | Bars & Restaurant directory | Propietary/Free | Closed |
| [Alminav](http://wiki.openstreetmap.org/wiki/Alminav) | Route planning and offline navigation for cyclists and hikers | Proprietary/Free (in-app purchases) | Closed |
| [Android-Speedometer](https://play.google.com/store/apps/details?id=de.meditgbr.android.tacho) | GPS based speedometer | Proprietary/Free and Premium | Closed |
| ["A Photo Manager" with "A Photo Map"](https://github.com/k3b/APhotoManager/)| Show/edit exif-geo info of photos on a map | GPL3+/Free | Open |
| [APRSdroid](http://aprsdroid.org/) | Amateur Radio | GPL2/Free | Open |
| [Archies Camping Guide](https://play.google.com/store/apps/details?id=jahdroid.archies) | European campsites | Proprietary/Commercial | Closed |
| [ARDrone Flight](https://play.google.com/store/apps/details?id=meavydev.ARDrone) | ARDrone Control | Proprietary/Free | Closed |
| [BackCountry Navigator](http://www.crittermap.com/app/backcountry-navigator-pro-gps/) | Outdoor navigation | Proprietary/Commercial | Closed |
| [Bariloche Guide](https://play.google.com/store/apps/details?id=com.animus.guideapp) | City Guide | Proprietary/Free | Closed |
| [Bike Computer](https://play.google.com/store/apps/details?id=de.rooehler.bikecomputer) | Routes and Tracks for Cycling | Proprietary/Free and Premium | Closed |
| [Bladenight App](https://play.google.com/store/apps/details?id=fr.ocroquette.bladenight) | Tracking for inline skating events | Proprietary/Free | Closed |
| [Calimoto](https://play.google.com/store/apps/details?id=com.calimoto.calimoto) | Motorrad navigation | Proprietary/Free (in-app purchases) | Closed |
| [Cartograph 2 Maps](https://www.cartograph.eu/) | Map viewer and tracking | Proprietary/Commercial | Closed |
| [Cruiser](https://wiki.openstreetmap.org/wiki/Cruiser) | Map and navigation platform for Android and Desktop | Proprietary/Free | Closed |
| [c:geo](https://www.cgeo.org) | Geocaching | Apache 2.0/Free | Open |
| [DogSheep](https://play.google.com/store/apps/details?id=com.dogsheep) | Customized maps and tours | Proprietary/Free | Closed |
| [ELEMNT](http://eu.wahoofitness.com/devices/gps-bike-computer-elemnt.html) | GPS bike computer | Proprietary/Commercial | Closed |
| [Forest(M)ap(p)](https://play.google.com/store/apps/details?id=de.inforst.waldkarte) | Tool for forestry | Proprietary/Commercial | Closed |
| [Geopaparazzi](http://www.geopaparazzi.eu) | Digital Field Mapping for geology and engineering with GIS data import | GPL3/Free | Open |
| [GPSLogger II](https://play.google.com/store/apps/details?id=com.emacberry.gpslogger) | AllInOne Logging & Tracking Solution | Proprietary/Free | Closed |
| [GPSSend](https://play.google.com/store/apps/details?id=com.tinkerpete.gps) | Live Tracking + Emergency Notification | Proprietary/Free | Closed |
| [Green Tracks](https://play.google.com/store/apps/details?id=com.mountain.tracks) | Climbing and hiking | Proprietary/Free | Closed |
| [Hunt Cyprus](https://play.google.com/store/apps/developer?id=Talent+S.A.) | Map and navigation application for hunters | Proprietary/Free and Commercial | Closed |
| [Locus](http://www.locusmap.eu/) | Multi-Function Map | Proprietary/Free and Premium | Closed |
| [Map GB](https://play.google.com/store/apps/details?id=com.mapgb) | Offline map of Britain with postcode search | Proprietary/Free (in-app purchases) | Closed |
| [Map Marker](https://play.google.com/store/apps/details?id=com.exlyo.mapmarker) | Map application to place markers | Proprietary/Free (in-app purchases) | Closed |
| [Mapet](http://nspace.hu/mapet/) | Hiking navigation | Proprietary/Free | Closed |
| [mappa](http://mynativeguide.com/) | Tourist Map | Proprietary/Commercial | Closed |
| [Mapsforge Tile Server](https://github.com/develar/mapsforge-tile-server) | Tile Server | MIT/Free | Open |
| [Mapsforge Tile Server](https://github.com/telemaxx/mapsforgesrv) | Tile Server | GPL3+/Free | Open |
| [Mapsforge-Web](https://github.com/virus-warnning/mapsforge-web) | Tile Server for Taiwan | MIT/Free | Open |
| [MapTag](http://www.rockethub.com/projects/9335-maptag) | Offline Location Sharing | Proprietary/Commercial | Closed |
| [Mobile Atlas Creator](http://mobac.sourceforge.net/) | Creation of offline atlases | GPL/Free | Open |
| [Momentum Tracker](https://play.google.com/store/apps/details?id=com.momentum_tracker.android) | Fitness Application | Proprietary/Free and Premium | Closed |
| [My Map](http://www.mymap.com.np/) | Offline map of Nepal | Proprietary/Free | Closed |
| [myWorkouts](http://www.myworkouts.org/) | Sports and GPS Tracker | Proprietary/Free | Closed |
| [Nautilus Charts](https://play.google.com/store/apps/details?id=gr.talent.nautiluscharts) | Offline Nautical Charts plotting and positioning system | Proprietary/Commercial | Closed |
| [Navi Cyprus](https://play.google.com/store/apps/developer?id=Talent+S.A.) | Map and navigation application | Proprietary/Free and Commercial | Closed |
| [Norgutel](https://play.google.com/store/apps/details?id=com.norgutel.app) | Secure real-time location sharing within a group of people | Proprietary/Free (in-app purchases) | Closed |
| [nsoria Fitness](https://play.google.com/store/apps/details?id=com.nsoria.fit) | GPS Bike Computer, Activity Tracker, Map and Navigation Application | Proprietary/Free | Closed |
| [Nutiteq](https://github.com/nutiteq/hellomap3d) | 2.5 / 3D Map View SDK with 3D Models | MIT/Free and Commercial | Open |
| [Offline City Map](http://topobyte.de/) | Tourist Map | Proprietary/Commercial | Closed |
| [Offline Maps](https://play.google.com/store/apps/developer?id=applantation.com) | Tourist Map | Proprietary/Commercial | Closed |
| [OpenTrail](http://wiki.openstreetmap.org/wiki/OpenTrail) | Freemap for Android | GPL/Free | Open |
| [OruxMaps](http://www.oruxmaps.com/) | Map Viewer | Proprietary/Free | Closed |
| [OSM Dashboard for OpenTracks](https://github.com/OpenTracksApp/OSMDashboard) | OpenStreetMap dashboard for OpenTracks | Apache 2.0/Free | Open |
| [OSMapTuner](http://osmaptuner.salzburgresearch.at/) | Map Viewer & Tag-Editor | Proprietary/Free | Closed |
| [Pocket Coruna](https://play.google.com/store/apps/details?id=com.dolphinziyo.corunaentubolsillo) | Tourist guide | Proprietary/Free | Closed |
| [Pocket Maps](https://github.com/junjunguo/PocketMaps) | Offline maps, routing & tracking functions | MIT/Free | Open |
| [RouteConverter](http://www.routeconverter.com/) | GPS conversion and editing tool | GPL2/Free | Open |
| [SatStat](https://mvglasow.github.io/satstat) | Android location, sensor and radio network status | GPL3+/Free | Open |
| [Serval Maps](http://developer.servalproject.org/dokuwiki/doku.php?id=content:servalmaps:main_page) | Collaborative Mapping using a Mesh Network | GPL3/Free | Open |
| [TingBY](http://ting.by/) | City guide | Proprietary/Free | Closed |
| [Ultra GPS Logger](https://play.google.com/store/apps/details?id=com.flashlight.ultra.gps.logger) | GPS tracker | Proprietary/Commercial | Closed |
| [Urban Biker](https://play.google.com/store/apps/details?id=com.sublimis.urbanbiker) | Activity tracker, maps, navigation, dashboard | Proprietary/Free | Closed |
| [UtalTransitMap](https://play.google.com/store/apps/details?id=com.mdmitry1973.utahtransitmap) | Transport Guide | Proprietary/Free | Closed |
| [Vectorial Map](http://www.vectorialmap.com/) | Map viewer and tracking | Proprietary/Commercial | Closed |
| [Villagers feng shui](https://play.google.com/store/apps/details?id=tacoball.com.geomancer) | Local service for Taiwan | LGPL3/Free | Open |
| [Visitor](https://play.google.com/store/apps/details?id=org.treefish.visitor) ([Demo](https://play.google.com/store/apps/details?id=org.treefish.visitor.demo)) | Save places and share them with others | Proprietary/Free and Commercial | Closed |
| [Watertrack ECO](http://watertrack.de/) | GPS Tracking on Germany Waterways | Proprietary/Free | Closed |
| [WhereYouGo](https://www.whereyougo.org) | Geocaching | GPL3/Free | Open |
| [Wikiloc](http://www.wikiloc.com/outdoor-navigation-app) | Map Viewer & Track recording/following | Proprietary/Free (in-app purchases) | Closed |
mapsforge-0.20.0/docs/Mapsforge-Maps.md 0000664 0000000 0000000 00000001106 14466627326 0017665 0 ustar 00root root 0000000 0000000 # Mapsforge map providers (in lexical order)
- [AndroidMaps](https://www.androidmaps.co.uk/)
- [BBBike](https://extract.bbbike.org/?format=mapsforge-osm.zip)
- [Freizeitkarte](https://www.freizeitkarte-osm.de/android/en/index.html)
- [Kurviger](https://download.kurviger.de/)
- [Mapsforge](https://download.mapsforge.org/) | [Mirror (fast)](http://ftp-stud.hs-esslingen.de/pub/Mirrors/download.mapsforge.org/)
- [OpenAndroMaps](https://www.openandromaps.org/en/)
- [OpenHiking](https://www.openhiking.eu/en/)
- [paws.cz](https://osm.paws.cz/)
- [vector.city](https://vector.city/)
mapsforge-0.20.0/docs/Mapsforge-Talks.md 0000664 0000000 0000000 00000002424 14466627326 0020047 0 ustar 00root root 0000000 0000000 # List of all mapsforge talks.
# Mapsforge Talks
This page lists all talks we held in chronological order.
|**Date**|**Event**|**Location**|**Speaker**|**Slides**|
|--------|---------|------------|-----------|----------|
| 2011-06-29 | [Android Stammtisch Berlin](http://www.android-in-berlin.de/) | c-base Berlin | Jürgen, Thilo | [slides](presentations/2011-06-29 c-base.odp)
| 2010-11-22 | [Google Technology User Group](http://www.berlin-gtug.org/) | newthinking store Berlin | Jürgen, Thilo | [slides](presentations/GTUG November 2010.odp)
| 2010-09-20 | [Fraunhofer-Institut für Software- und Systemtechnik](http://www.isst.fraunhofer.de/) | ISST Berlin | Jürgen, Thilo | [slides](presentations/Talk at Fraunhofer ISST.odp)
| 2010-07-11 | [State of the Map Conference] (http://stateofthemap.org/)| Girona Conference Centre | Thilo | [slides](presentations/State of the Map 2010.odp)
| 2010-06-28 | [Mobile Application Development with Android](http://www.hpi.uni-potsdam.de/naumann/teaching/ss_10/mad_with_android.html) | Hasso-Plattner-Institut Potsdam | Jürgen, Thilo | [slides](presentations/HPI - MAD with Android, 28.06.2010.odp)
| 2010-05-26 | [droidcon Barcamp](http://www.droidcon.de/)| Dahlem Cube Berlin | Jürgen, Thilo | [slides](presentations/barcamp droidcon 2010.odp)
mapsforge-0.20.0/docs/POI.md 0000664 0000000 0000000 00000017571 14466627326 0015510 0 ustar 00root root 0000000 0000000 # POI API
This article describes how to use the POI API in mapsforge POI library (from `prototypes` branch).
## Introduction
_Points of Interest_ (POIs) are points with a given position, category and data. A POI database is used to store a set of POIs and to search for POIs within a given area.
The mapsforge POI library uses SQLite for storing POIs.
All reading and writing operations are done via classes implementing the `PoiPersistenceManager` interface. POI categories can be defined on creation time only. Categories are implemented as trees and can be accessed via classes implementing the `PoiCategoryManager` interface.
Externally you can use your favorite SQLite manager for browsing the database, e.g. [spatialite-gui](https://www.gaia-gis.it/fossil/spatialite_gui/index).
## Quick Start
This section provides you with information how to create a POI database, how to use it for POI search and how to visualize the results.
### Creating a POI Database
The tool is implemented as a plugin to the [Osmosis](http://wiki.openstreetmap.org/wiki/Osmosis) software. To use the tool, you are required to have a working installation of Osmosis and the writer plugin copied to the plugins directory of Osmosis. You should also be familiar with the Osmosis tool.
Download the release or snapshot writer plugin (**jar-with-dependencies**) from [Maven Central](https://repo1.maven.org/maven2/org/mapsforge/) or [Sonatype OSS Repository Hosting](https://oss.sonatype.org/content/repositories/snapshots/org/mapsforge/) and read the Osmosis [documentation](http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage#Plugin_Tasks) for how to install a plugin.
To convert OSM data to a POI database execute the following command:
```bash
$OSMOSIS_HOME/bin/osmosis --rb file=your_map_file.osm.pbf --poi-writer file=your_database.poi
```
The `--poi-writer`, or short `--pw` task indicates that the POI writer plugin should handle the data that was read from the given OSM stream.
#### Basic Options
|**Option**|**Description**|**Valid values**|**Default value**|
|----------|---------------|----------------|-----------------|
|`file`|Path to the output file, the file will be overwritten if existent. By convention we use the file ending `poi`.||mapsforge.poi|
|`bbox`|Bounding box definition as comma-separated list of coordinates in the form: minLat,minLon,maxLat,maxLon (be aware that osmosis does not allow **white space** in its command line parameters).|minLat, minLon, maxLat, maxLon in exactly this order as degrees|(blank)|
|`all-tags`|Export all tags. If false only the name will be exported.|true/false|true|
|`preferred-language`|If not specified, only the default language with no tag will be written to the file. If a language is specified, it will be written if its tag is found, otherwise the default language will be written. *Redundant if all-tags is true.*|language code as defined in ISO 639-1 or ISO 639-2 if an ISO 639-1 code doesn't exist|(blank)|
|`comment`|Writes a comment to the file.||(blank)|
|`progress-logs`|Enable progress logs|true/false|true|
#### Advanced Options (only use when you know what you are doing)
|**Option**|**Description**|**Valid values**|**Default value**|
|----------|---------------|----------------|-----------------|
|`tag-conf-file`|Path to an XML configuration file that contains mappings from OSM tags to category names and a hierarchy of those categories.|path to an XML file|(blank) internal default poi mapping is used|
|`names`|Add only named entities.|true/false|false|
|`ways`|Also parse ways.|true/false|true|
|`normalize`|Add normalized_name (for accent insensitive search). *Works if all-tags is true.*|true/false|true|
|`geo-tags`|Add geo tags.|true/false|false|
|`filter-categories`|Drop empty categories.|true/false|true|
### Example
With the POI database created you can now use it with mapsforge. For testing purposes, you may also use one of our ready-to-use POI databases from our [server](https://download.mapsforge.org/pois/) (not suitable for mass downloads). You will also need the SQLite Android Bindings native library files in your project. You can use the Samples project as a boilerplate, as it already has all necessary files and dependencies. The library files are located each within a separate sub-folder for each target architecture (_armeabi-v7a_, _arm64-v8a_, _x86_, _x86_64_). You can delete unneeded architectures to reduce file size.
The sources for those libraries can be found at [SQLite Android Bindings](https://sqlite.org/android/) site. To compile these manually you need the [Android NDK](https://developer.android.com/ndk/). The compilation process can be started with `ndk-build` from within the `jni` directory. The compiling process also moves the library files to their correct (sub)folders.
With everything set up you can check the ['POI search' example](https://github.com/mapsforge/mapsforge/blob/master/mapsforge-samples-android/src/main/java/org/mapsforge/samples/android/PoiSearchViewer.java) for:
- How a database is opened for read access. Any access to the database is encapsulated via classes implementing `PoiPersistenceManager`. The instantiation of these classes is done via a factory class. The categories and their hierarchy are maintained via classes implementing `PoiCategoryManager`. The category configuration is read-only.
- The `PoiPersistenceManager` object is used for querying the POIs in various ways. The query returns a collection of `PointOfInterest` objects. These are containers that contain a POI's position, ID, category and additional data. Additional data are stored as a string and can be arbitrary. There is no specification for the encoding of those data. The current implementation stores the POI's tags as an UTF-8 encoded string in the data field.
- It is always a good idea to close an open database when there will be no more operations on it. This can simply be done by the `close()` method.
- With this done you can simply retrieve the POIs and add them as overlays.
- In order to get POI write access call `getPoiPersistenceManager(filename, false)` via the factory class.
## Advanced Topics
### Custom Category Configurations
If the provided category configuration does not fulfill your needs, you can easily create your own.
The default internal poi mapping is defined in https://github.com/mapsforge/mapsforge/blob/master/mapsforge-poi-writer/src/main/config/poi-mapping.xml. So if you want to define your own custom mapping, use the internal mapping as a reference.
Please consult the XML-Schema documentation of https://github.com/mapsforge/mapsforge/blob/master/resources/poi-mapping.xsd to learn about how to implement your custom mapping. The XML-Schema is very easy to understand. We recommend to use a proper editor for XML to allow auto-completion and validation if you provide an XML-Schema.
### Filtered Search
The API supports POI search inside a specified rectangle, near a given position or by a tag-data pattern.
You can also use category filters for filtering the results based on the categories added to them.
And lastly you can search by OSM tags. With '*' you can search through all tags,
e.g. `Tag tag1 = new Tag("*", Pergamonmuseum);`
Then you add them to a list `tagList.add(new Tag("addr:street", "Bodestraße"))` and call
`persistenceManager.findInRect(bbox, categoryFilter, tagList, 1)`
### POI DB Schema
The DB schema consists of:
- `poi_categories` with the categories tree
- `poi_data` with the POI information
- `poi_category_map` with the POI categories mapping
- `poi_index` with the POI coordinates
- `metadata` with the DB metadata
## Version history
| **Version** | **Date** | **Changes** |
|-------------|------------|-------------------------------------------------|
| 1 | 2016-06-11 | Initial release of the specification |
| 2 | 2017-12-03 |
POI multiple categories
|
| 3 | 2023-01-12 |
Android without external libs
|
mapsforge-0.20.0/docs/Project-Conventions.md 0000664 0000000 0000000 00000005700 14466627326 0020761 0 ustar 00root root 0000000 0000000 # Description of important conventions in the mapsforge project.
# Project conventions
Our project conventions are based on the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html). In addition to these conventions, the following rules apply to all project members.
## Language and character encoding
We use only English in our project. Therefore all names of packages, files, methods, variables as well as all comments, debug output and commit messages must be in English.
The Eclipse IDE comes with a built-in spell checker that should be used. It can be activated via `Window > Preferences > General > Editors > Text Editors > Spelling`.
Please use UTF-8 encoding and Unix line breaks ('\n') for all source files, comments and other written documentation.
## Committing to the repository
Each commit must have a proper comment, which summarises all its modifications. Whenever possible, changes that logically belong together should also be uploaded in a single commit.
## Java specific conventions
### Code style
We work with the Eclipse IDE and use the integrated code formatter. Our main Eclipse project contains a profile for the Java code formatter named *mapsforge*. Before committing Java code to the repository, this code style must be applied to all modified source files.
Please do not modify the mapsforge profile without approval of the other project members.
### Visibility
Please keep the visibility of all classes, methods and fields to a minimum. Use `public` modifiers only if necessary.
### Javadoc
We use Javadoc for documentation purposes. All important classes, methods and fields need a proper Javadoc comment. When writing a Javadoc comment for a method, all parameters and the return value must be documented. Please update Javadoc comments whenever the related code has been changed.
In general you should follow the [Sun conventions for writing documentation comments](https://www.oracle.com/technetwork/java/javase/documentation/index-137868.html).
### Compiler warnings
Many common Java programming mistakes can be avoided by enabling compiler checks. Malformed Javadoc comments or missing Javadoc tags are also unnecessary. As we try to prevent erroneous Java code and bad Javadoc comments, we enable all compiler warnings that enforce a higher level of code quality and readability. You can check the compiler settings of an Eclipse project via `Properties > Java Compiler > Errors/Warnings` and `Properties > Java Compiler > Javadoc`.
If possible, all warnings should be solved by the originator. Ask other developers for help if you don't know why a certain warning is raised or how to solve it correctly.
Do not use `@SupressWarnings` annotations to hide warnings. Do not commit code that triggers a lot of warnings. Never commit code that cannot be compiled and thus renders the whole project unusable for all other developers.
Please do not modify the compiler settings without approval of the other project members. mapsforge-0.20.0/docs/ReleaseProcedures.md 0000664 0000000 0000000 00000002735 14466627326 0020471 0 ustar 00root root 0000000 0000000 # Release Procedures
This documents the steps for an official mapsforge release.
Set Version Numbers
-------------------
Set the new version number in `build.gradle`.
Deployment to Sonatype OSSRH
----------------------------
```bash
gradlew -Dorg.gradle.parallel=false publish
```
Your `gradle.properties` needs to contain:
```
signing.keyId=
signing.password=
signing.secretKeyRingFile=
SONATYPE_USERNAME=
SONATYPE_PASSWORD=
```
Signatory credentials:
- The public key ID (an 8 character hexadecimal string)
- The passphrase used to protect your private key
- The absolute path to the secret key ring file containing your private key
Ludwig and Emux have the SONATYPE_USERNAME and SONATYPE_PASSWORD for this.
Publish Release
---------------
Log into https://oss.sonatype.org/index.html
The user is Jürgen, Ludwig and Emux have id and password for it.
And navigate to Staging Repositories, there should be then a mapsforge one somewhere in the list (not sure if there is an easier way to find things, the mapsforge one is usually at the bottom).
Check the released artifacts and click on Close. Sonatype will then perform its own validation. After that click Release, at that point it will be staged to Maven Central, but might take some time.
(This is where the Sonatype user was created for mapsforge https://issues.sonatype.org/browse/OSSRH-4231)
Git tags
--------
Add tags to Git commit in form X.Y.Z
Developer Links
---------------
Add release information to the developer wikis.
mapsforge-0.20.0/docs/Rendertheme.md 0000664 0000000 0000000 00000041322 14466627326 0017312 0 ustar 00root root 0000000 0000000 # RenderTheme
This article describes how to use XML-based renderthemes to style maps, including the extensions of Rendertheme V4 or newer.
## Introduction
A render-theme is an XML file which contains rules and rendering instructions. Such files can be used to customize the visual style of the rendered map. The mapsforge map library comes with built-in render-themes similar to the [Osmarender](http://wiki.openstreetmap.org/wiki/Osmarender) style. More internal render-themes will be added in the future. External render-theme files are also supported and can be activated via the `tileRendererLayer.setXmlRenderTheme(new ExternalRenderTheme(File))` method at runtime.
Here is an example of a simple render-theme with a few different rules and rendering instructions:
```xml
```
Syntax and semantics of render-theme files are similar but not identical to [Osmarender rules](http://wiki.openstreetmap.org/wiki/Osmarender/Rules). A formal render-theme description exists as an *XML schema document*, it can be found in the [repository](https://github.com/mapsforge/mapsforge/blob/master/resources/renderTheme.xsd). If an invalid render-theme is submitted to the map library, an `org.xml.sax.SAXException` will be thrown during XML parsing.
## Rules
A rule element has several attributes to specify which map elements the rule matches.
|**Attribute**|**Valid values**|**Description**|**Required**|
|-------------|----------------|---------------|------------|
|e|
node
way
any
|Defines which map element type will be matched.|yes|
|k|[string](http://www.w3.org/TR/xmlschema-2/#string)|The key of the tile source tag.
A vertical bar "\|" can be used to specify multiple keys.
An asterisk "`*`" serves as wildcard character.
|yes|
|v|[string](http://www.w3.org/TR/xmlschema-2/#string)|The value of the tile source tag.
A vertical bar "\|" can be used to specify multiple values.
An asterisk "`*`" serves as wildcard character.
A tilde "~" matches if the map element does not have a tag with the specified key.
|yes|
|closed|
yes
no
any
|Defines which ways will be matched. A way is considered as closed if its first node and its last node are equal.|no (default is *any*)|
|zoom-min|[unsignedByte](http://www.w3.org/TR/xmlschema-2/#unsignedByte)|The minimum zoom level on which the rule will be matched.|no (default is 0)|
|zoom-max|[unsignedByte](http://www.w3.org/TR/xmlschema-2/#unsignedByte)|The maximum zoom level on which the rule will be matched.|no (default is 127)|
Rules can be nested to any level of depth. This can be used to define rendering instructions which depend on multiple rules. It may also be used to structure complex declarations and to avoid redundancy:
```xml
…
…
```
## Rendering Instructions
A rendering instruction specifies how a map element is drawn. Each rule element might include any number of rendering instructions. Except for labels and symbols, all rendering instructions are drawn on the map in the order of their definition.
At the moment, the following rendering instructions are available:
- area
- caption
- circle
- line
- lineSymbol
- pathText
- symbol
## Map background
The `rendertheme` root element has an optional `map-background` attribute which can be used to define the background color of the map. The default value is "#FFFFFF" (white).
```xml
…
```
## Rendertheme Version 4 or newer
With mapsforge release 0.5, we introduce the enhanced **Rendertheme V4 XML** with many new features to style a map.
Rendertheme V4 or newer remains **fully backward compatible** with version 3, meaning that any previously developed rendertheme definition will still render with V4 without any changes required (you do not even need to change the version number in the header).
You can find the full xsd in the mapsforge repository at https://github.com/mapsforge/mapsforge/blob/master/resources/renderTheme.xsd.
But if you want to develop your renderthemes further, Rendertheme V4 offers a number of enhancements. If you want to make use of the new features, you will first need to set your rendertheme version in the header to 4 or newer:
```xml
```
###Header Elements
The following header elements can be used:
- version: should be "4" or newer now.
- map-background: a color value to set the color of a blank tile. This should not be used to set the color of the sea or land.
- map-background-outside: a color value to set the color of the background of a map outside the map area. Effectively everything outside the map area will be overwritten by this color. For transparent layers, the color value will be ignored, but the outside area will be erased to transparent.
## Stylemenus
One of the limitations of V3 was that even minor changes to a style required an entirely new rendertheme definition. Rendertheme V4 introduces the **stylemenu** that allows you to selectively turn rules on and off, in effect defining multiple layers in a map that can be controlled individually.
To make use of style menus, you will first need to group the elements of your map into categories by attaching a **cat** element to them.
```xml
```
The same cat tag can be given to as many elements as you like, but each element can only have one cat tag.
However, this does not limit your ability to group elements, as in the style definitions, multiple categories can be combined into one layer.
You can think about the cat tag as a switch that switches all elements in the rendertheme below it either on or off. If a category is turned off, all elements below it become invisible. If a category is turned on, all elements below become visible (unless they are themselves controlled via a category which is turned off).
Layers are combinations of categories that can be toggled on and off together and other layers (via **overlay**) that can be toggled on and off individually. In general, categories are not visible to a map user, but layers are. To make layers more user friendly, they can be named with the name tag in various languages.
```xml
```
A set of layer definitions makes up a style:
```xml
```
The **visible** attribute is meant to indicate which of the layers are visible in the user interface. Layers where visible is set to false should not be seen by a user, and are thus useful to build base-layers of common categories from which then user-visible layers can be inherited, like this:
```xml
```
To turn layers on by default, add the **enabled=true** attribute. In this case, buildings should be by default visible, while parking related elements not:
```xml
```
The Samples app has a completely worked style menu.
## Map Integration
When a V4 rendertheme is parsed, the style menu definitons are parsed and a callback is made into the application giving it access to the stylemenu definitions.
On Android, the stylemenus can thus be converted into standard Android settings, providing a seamless integration of the rendertheme definitions that do not require changes every time the rendertheme changes. There is an example on how to do this in the Samples app, see the Settings.java file.
## Symbol Positioning
In previous versions it was difficult to position captions relative to map icons. Now it is possible to specify the position directly, without having to rely on position calculations. The positioning works regardless of map scaling as the relative distances are computed automatically.
To associate a caption with a symbol, the symbol needs an id and the caption needs to refer to this symbol:
```xml
```
The options for positioning are
- below: below icon, text is centered
- below_right
- below_left
- above: above icon, text is centered
- above_right
- above_left
- left: left of icon, text is right aligned
- right: right of icon, text is left aligned
- center
- auto: the default if nothing is set, allows the mapsforge library to select the best position
The **auto** (or nothing) setting is recommended. In version 0.5 of mapsforge this is always executed as below, but in future versions this will allow mapsforge to set the position. We are thinking of an improvement that will avoid labels that span multiple tiles and can thus improve rendering speed.
## Priorities
In previous versions, labels were drawn in the order they were encountered often meaning that less important icons/captions were drawn first and did not leave any space for more important labels (e.g. town names drawn in favour of more important city names). This issue has been addressed by introducing priority levels for labels and icons.
Labels and icons are now drawn in order of priority, higher priorities first. The default priority is 0, so anything with a priority less than 0 will only be drawn if the space is not yet taken up, priorities higher than 0 will be drawn before default priority labels.
```xml
```
## Display
The display directive has been added whereever priorities can be used. The following values can be used:
- always: an element will always be displayed regardless of space.
- ifspace: an element will only be displayed if the layout algorithm determines there is space and no higher priority element will take it.
- never: an element is not displayed. This is useful to blank out elements.
## SVG Symbols
Symbols can be either defined in the raster PNG format or as vector graphics in SVG format. Mapsforge uses libraries for [Android](https://github.com/BigBadaboom/androidsvg) and [Java](https://github.com/blackears/svgSalamander) that support a large subset of the [Tiny SVG](http://www.w3.org/TR/SVGTiny12/index.html) specification.
To speed up map rendering, SVG symbols are now only rendered at the point where they are needed and on Android are then written to disk in the PNG format. Subsequent uses will retrieve the file just like another raster image source. The file cache where these files are stored can be cleared through a static call.
```java
AndroidGraphicFactory.clearResourceFileCache();
```
### SVG Scaling
SVG resources can now be automatically scaled to accommodate different device resolutions.
The options available are:
- If no size is given, a svg is rendered to a 20x20px multiplied by the device scale factor and any user adjustments.
- symbol-percent: the svg is rendered as a percentage size of its default size. This is the best way to make certain svg smaller or bigger than others.
- symbol-width and/or symbol-height: additional parameters give the absolute pixel size for the symbol, again adjusted by the scale factors. If only one dimension is set, the other is calculated from aspect ratio.
The tiling directive has now been removed as we have introduced code that tiles area shaders in a continuous pattern regardless of shader bitmap size.
### SVG Bitmap Design
For area symbols it is best to design a symbol to fit a tile unless you know particular tile sizes will be used. To keep SVG sizes down, it is advisable to make use of the reuse facilities within SVG files and to remove any unneccessary comments and metadata.
A simple SVG symbol for a cemetery can look like this:
```xml
```
mapsforge-0.20.0/docs/Specification-Binary-Map-File.md 0000664 0000000 0000000 00000035306 14466627326 0022447 0 ustar 00root root 0000000 0000000
# Specification: Mapsforge Binary Map File Format
## Conceptual design
The *mapsforge binary map file format* is designed for map rendering on devices with limited resources like mobile phones.
It allows for efficient storage of geographical information (e.g. OpenStreetMap data), fast tile-based access,
and filtering of map objects by zoom level.
The map file consists of several sub-files, each storing the map objects for a different zoom interval. Zoom intervals are non-overlapping groups of consecutive zoom levels. Each zoom interval is represented by a single member of the group, the so-called *base zoom level*.
## General remarks
- All latitude and longitude coordinates are stored in microdegrees (degrees × 106).
- Numeric fields with a fixed byte size are stored with *Big Endian* byte order.
- Unsigned numeric fields with a variable byte encoding are marked with *`VBE-U` INT* and stored as follows:
- the first bit of each byte is used for continuation info, the other seven bits for data.
- the value of the first bit is 1 if the following byte belongs to the field, 0 otherwise.
- each byte holds seven bits of the numeric value, starting with the least significant ones.
- Signed numeric fields with a variable byte encoding are marked with *`VBE-S` INT* and stored as follows:
- the first bit of each byte is used for continuation info, the other six (last byte) or seven (all other bytes) bits for data.
- the value of the first bit is 1 if the following byte belongs to the field, 0 otherwise.
- each byte holds six (last byte) or seven (all other bytes) bits of the numeric value, starting with the least significant ones.
- the second bit in the last byte indicates the sign of the number. A value of 0 means positive, 1 negative.
- numeric value is stored as magnitude for negative values (as opposed to two's complement).
- All strings are stored in UTF-8 as follows:
- the length *L* of the UTF-8 encoded string in bytes as *`VBE-U` INT*.
- *L* bytes for the UTF-8 encoding of the string.
## File structure
For each zoom interval a so called **sub-file** is created. A sub-file consists of a **tile index segment** that stores a fixed-size pointer for each tile created in the **tile data segment**. The order of storing tiles to the tile data segment and their corresponding pointers to the tile index segment is row-wise and within a row column-wise. Rows and columns are inherently given by the grid layout of the tiles that is defined by the rectangular bounding box. For each tile in the grid, meta information is available in the **tile header** accompanied by its payload data (POIs and ways).
To read the data of a specific tile in the sub-file, the position of the fixed-size pointer in the index can be computed from the tile coordinates. The index entry points to the offset in the sub-file where the data is stored. Tile coordinates are implicitly given due to the structure of the tile index, thus no tile coordinates need to be stored along each tile.
# meta data
file header
# sub-files
for each sub-file
# tile index segment
tile index header
tile index entries
# tile data segment
for each tile
tile header
for each POI
POI data
for each way
way properties
way data
## File header
|**bytes**|**optional**|**name**|**description**|
|---------|------------|--------|---------------|
|20||magic byte|`mapsforge binary OSM`|
|4||header size|size of the file header in bytes (without magic byte) as 4-byte *INT*|
|4||file version|version number of the currently used binary file format as 4-byte *INT*|
|8||file size|The total size of the map file in bytes|
|8||date of creation|date in milliseconds since 01.01.1970 as 8-byte *LONG*|
|16||bounding box|geo coordinates of the bounding box in microdegrees as 4\*4-byte *INT*, in the order minLat, minLon, maxLat, maxLon|
|2||tile size|the tile size in pixels (e.g. 256)|
|variable||projection|defines the projection used to create this file as a string|
|1||flags|
1. bit (mask 0x80): flag for existence of debug information
2. bit (mask 0x40): flag for existence of the *map start position* field
3. bit (mask 0x20): flag for existence of the *start zoom level* field
4. bit (mask 0x10): flag for existence of the *language(s) preference* field
5. bit (mask 0x08): flag for existence of the *comment* field
6. bit (mask 0x04): flag for existence of the *created by* field
7.-8. bit (mask 0x02, 0x01): reserved for future use
|
|8|yes|map start position|geo coordinate in microdegrees as 2\*4-byte *INT*, in the order lat, lon|
|1|yes|start zoom level|zoom level of the map at first load|
|variable|yes|language(s) preference|The preferred language(s) for names as defined in ISO 639-1 or ISO 639-2. This field is copied from the preferred-languages option of the map writer.|](|variable||zoom interval configuration|
for each zoom interval:
base zoom level as *BYTE*
minimal zoom level as *BYTE*
maximal zoom level as *BYTE*
absolute start position of the sub file as 8-byte *LONG*
size of the sub-file as 8-byte *LONG*
|) as string|
|variable|yes|comment|comment as a string|
|variable|yes|created by|The name of the application which created the file as a string|
|variable||POI tags|
amount of tags as 2-byte *SHORT*
tag names as a strings
tag IDs are implicitly derived from the order of tag names, starting with 0
|
|variable||way tags|
amount of tags as 2-byte *SHORT*
tag names as a strings
tag IDs are implicitly derived from the order of tag names, starting with 0
|
|1||amount of zoom intervals|defines the amount of zoom intervals used in this file|
|variable||zoom interval configuration|
for each zoom interval:
base zoom level as *BYTE*
minimal zoom level as *BYTE*
maximal zoom level as *BYTE*
absolute start position of the sub file as 8-byte *LONG*
size of the sub-file as 8-byte *LONG*
|
### Tile index header
|**bytes**|**optional**|**name**|**description**|
|---------|------------|--------|---------------|
|16|yes|index signature|If the debug bit in the file header is set: `+++IndexStart+++`|
### Tile index entry
|**bytes**|**optional**|**name**|**description**|
|---------|------------|--------|---------------|
|5||index entry|
1. bit (mask: 0x80 00 00 00 00): flag to indicate whether the tile is completely covered by water (e.g. a tile amidst the ocean)
2.-40. bit (mask: 0x7f ff ff ff ff): 39 bit offset of the tile in the sub file as 5-bytes *LONG* (optional debug information and index size is also counted; byte order is BigEndian i.e. most significant byte first) If the tile is empty offset(tile,,i,,) = offset(tile,,i+1,,)
Note: to calculate how many tile index entries there will be, use the formulae at [http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames] to find out how many tiles will be covered by the bounding box at the base zoom level of the sub file|
### Tile header
|**bytes**|**optional**|**name**|**description**|
|---------|------------|--------|---------------|
|32|yes|tile signature|If the debug bit in the file header is set: `###TileStartX,Y###` where X and Y indicate the tile coordinates of the current tile; the text is always padded to 32 bytes by adding whitespaces|
|variable||zoom table|A table indicating the number of POIs and ways in this tile for the different zoom levels covered by the enclosing sub-file. Let Z be the number of zoom levels supported by the enclosing sub-file (e.g. 6 for a sub-file that covers levels 12-17). Then the table has Z rows and 2 columns (first column: POIs, second column: ways). Each cell in the table represents the number of POIs or ways on the specific zoom level. The table is written row-wise and values are encoded as *`VBE-U` INT*.|
|variable||first way offset|offset in bytes to the first way in this tile as *`VBE-U` INT*. The counting starts at the following byte (i.e. first way offset itself is not counted).|
### POI data
|**bytes**|**optional**|**name**|**description**|
|---------|------------|--------|---------------|
|32|yes|POI signature|If the debug bit in the file header is set: `***POIStartX***` where X defines the OSM-ID of the POI; the text is always padded to 32 bytes by adding whitespaces|
|variable||position|geo coordinate difference to the top-left corner of the current tile as *`VBE-S` INT*, in the order lat-diff, lon-diff|
|1||special byte|
|
|variable||tag id|the tag id(s) of the POI as *`VBE-U` INT*, then any variable tag values as different data types, whose content can be evaluated from the tags' wildcard|
|1||flags|
1. bit: flag for existence of a POI name
2. bit: flag for existence of a house number
3. bit: flag for existence of an elevation
4.-8. bit: reserved for future use
|
|variable|yes|name|name of the POI as a string|
|variable|yes|house number|house number of the POI as a string|
|variable|yes|elevation|elevation of the POI in meters as *`VBE-S` INT*|
### Way properties
|**bytes**|**optional**|**name**|**description**|
|---------|------------|--------|---------------|
|32|yes|way signature|If the debug bit in the file header is set: `---WayStartX---` where X defines the OSM-ID of the way; the text is always padded to 32 bytes by adding whitespaces|
|variable||way data size|number of bytes that are needed to encode the current way as *`VBE-U` INT*, starting from the sub tile bitmap (i.e. way signature and way size are not counted)|
|2||sub tile bitmap|A tile on zoom level z is made up of exactly 16 sub tiles on zoom level z+2 for each sub tile (row-wise, left to right):
1 bit that represents a flag whether the way is relevant for the sub tile
Special case: coastline ways must always have all 16 bits set.|
|1||special byte|
|
|variable||tag id|the tag id(s) of the Way as *`VBE-U` INT*, then any variable tag values as different data types, whose content can be evaluated from the tags' wildcard|
|1||flags|
1. bit: flag for existence of a way name
2. bit: flag for existence of a house number
3. bit: flag for existence of a reference
4. bit: flag for existence of a label position
5. bit: flag for existence of *number of way data blocks* field
case 0: field does not exist, number of blocks is one
case 1: field exists, more than one block
6. bit: flag indicating encoding of way coordinate blocks
case 0: single delta encoding
case 1: double delta encoding
7.-8. bit: reserved for future use
|
|variable|yes|name|name of the way as a string|
|variable|yes|house number|house number of the way as a string|
|variable|yes|reference|reference of the way as a string|
|variable|yes|label position|geo coordinate difference to the first way node in microdegrees as 2 × *`VBE-S` INT*, in the order lat-diff, lon-diff|
|variable|yes|number of way data blocks|The amount of following way data blocks as *`VBE-U` INT*.|
### Way data
|**bytes**|**optional**|**name**|**description**|
|---------|------------|--------|---------------|
|variable||number of way coordinate blocks|The amount of following way coordinate blocks as *`VBE-U` INT*. An amount larger than 1 indicates a multipolygon with the first block representing the outer way coordinates and the following blocks the inner way coordinates.|
|variable||way coordinate block|for each way coordinate block:
amount of way nodes of this way as *`VBE-U` INT*
geo coordinate difference to the top-left corner of the current tile as *`VBE-S` INT*, in the order lat-diff, lon-diff
geo coordinates of the remaining way nodes stored as differences to the previous way node in microdegrees as 2 × *`VBE-S` INT* in the order lat-diff, lon-diff using either single or double delta encoding (see below).
|
Coordinates in a way data block are encoded in either 'single-delta' or 'double-delta' format according to the flag in the way properties. The encoder chooses the most efficient format on a way-by-way basis so most maps will contain examples of both types.
For single-delta encoding the lat-diff and lon-diff values describe the offset of the node compared to its predecessor.
let x1 be the lat of the previous way node and x2 be the lat of the current way node.
Then the difference is defined as x2 - x1.
For double-delta encoding the lat-diff and lon-diff values describe the *change* of the offset compared to the offset of the previous node, after the first node. The following pseudocode shows how to decode coordinates encoded in this format.
set 'previousLat' to the latitude (in degrees) of the top-left corner of the current tile
set 'previousOffset' to zero
set 'count' to zero
while there is data to be read:
set 'encodedValue' to the next item of data (VBE-S, in microdegrees)
set 'lat' to 'previousLat' + 'previousOffset' + 'encodedValue' / 1,000,000
if 'count' is greater than zero, then
set 'previousOffset' to 'lat' - 'previousLat'
set 'previousLat' to 'lat'
'lat' contains the decoded data
add one to 'count'
Example of decoding double-delta encoded data:
tile origin: 52.123456, encoded values: -8286, -57, 129, -15, -129
decoded values: 52.11517, 52.115113, 52.115185, 52.115242, 52.11517
## Version history
|**Version**|**Date**|**Changes**|
|-----------|--------|-----------|
|1|2010-11-21|Initial release of the specification|
|2|2011-01-26|
Introduced variable byte encoding for some numeric fields to reduce the file size
Modified some field names and descriptions for clarification