mapsforge-0.10.0/000077500000000000000000000000001334120277700135615ustar00rootroot00000000000000mapsforge-0.10.0/.gitattributes000066400000000000000000000004101334120277700164470ustar00rootroot00000000000000# 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.10.0/.github/000077500000000000000000000000001334120277700151215ustar00rootroot00000000000000mapsforge-0.10.0/.github/CONTRIBUTING.md000066400000000000000000000032021334120277700173470ustar00rootroot00000000000000## 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 our public [mapsforge-dev](https://groups.google.com/group/mapsforge-dev) mailing list. You may also create a new issue on [Github](https://github.com/mapsforge/mapsforge/issues) or comment on an existing one to describe your ideas. 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. Detailed information about them can be found in the [Project Conventions](docs/Project-Conventions.md) article. 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 syntax make sure your IDE uses 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.10.0/.gitignore000066400000000000000000000004061334120277700155510ustar00rootroot00000000000000# 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.10.0/.travis.yml000066400000000000000000000053431334120277700156770ustar00rootroot00000000000000sudo: false language: android jdk: - oraclejdk8 env: global: - ANDROID=28 - ANDROID_BUILD_TOOLS=28.0.2 - GRADLE_OPTS="-Xmx2048m" - secure: UtoDY9kpdxNA7hwISdkz5lZTOGRuIxt+OF3K68jRLqG4MnGEO17jJ+cFMEDQ8iuPogNnlGNgsGrrqwTncCh9xftlDDcu29tzGCmoW74EwWni99ppgXbH3CQSFdZ7ubQ47ELbJPjnP6ITwmDURQ9C1beIJrRbHSe0H9Pg3kuIC5Me/aWEVTAoNuVjQD9cXI5GFcj1lO3QRRTMbS0Sy2zuoOwV4frWT3+NKzKZ69Y7B+w9QWnhAmYogeVk80UQZcHRgJD8jxz5B96uToZHun4uN4xIDLu011IffohuaZR2QHA9c1WmZNyN//gaflCYNphGYslupcft0AxhOYQvv9iQSgRgdPuocIPlHztbklEt1XgVxyU1XT9jw3zYIM4NsTSjBEs7txghZEQttxoroCXx/B8oqo6mof9Xjg1Tq/KShE8BWAAImxJNpGDEBKhcXwgGqls1YMD5+VW6ncGTuGWJVpFZVQ4sjD3+mWhCjgwBF5UP3U29e3WBROEdk80tqeTTt5yr28MbKDrG7SswnU0zFjvwrYNCunp7HZuFo7RzoYGyDujas6c+HE6uDMSYTFYRVRisX2U2fgYNGjShRiltTW7cj99BGm0+9edEj8+6snWqtxknEGk9sCSufv0OSdpddl7ZihaWyQ02VVDFXi1bKo9fNGwjx2wASZQr42NeZyE= - secure: U/PKpCUtnofYNfKJ4uS/OAir0Rq80QYirshnMg270XCHQDtZ82RAlLLPop2/9BtXhTH3tYvmBDjMhy4Z9o4dbGaUgVuVZ56u4E6O8KZUpVVCe8o2+ra0pTKoFWc62aQYAZjJtqZjrXQTeFFQULoHc4Ep5O95JWFLKK/74OqAQiAOr/3Y7hMWlA0l8ifM5U/3xsLqAYUBAw5d/GBg0gYtqZvt88cHrBwBk9caDPcjqTLdAX/CuH9Mkz5MK1obXPL6o2YDFNTVlVMXKlPJv/PCBGlAM8fRdTwFKJjQy2DZ9gio3xUGvaLo9PNQMLoLXIAPqUfd46VvuWXZXMW6Hv4bs6mc5yw6yYFLZdJGcE4tLe3SCFkt8yXyhvvRFVhG68aqzVY+JtKZ/UXhX9qhFaH5RsnjRA2Hw9R3Q1Azk81ZRRBtraDpzMsLV3MaFjoCdEEm/l3pcBYmXXlI/Mh02ZLgX+9a6nygAZvpCclrvLCPJyXQFqwP/d/jdZBwXWjj2TNGliXNkQBNr0XYY/wfHkjp8/cM7Y4NVAgX0Emrp7alnqZkcYvsGLkpjUV8NUwZQ63+cH5TSxtRefm6bwTF9BgxLfLekgH+XWA6Pp14KJsgX4OGAvExL6uryTaW9W0/yAa+f8hhPXnHN9YS8IyhPDIrJLwOcipqY8jOCvmYkU2QDCY= android: components: - tools - platform-tools - tools - build-tools-$ANDROID_BUILD_TOOLS - android-$ANDROID before_install: - yes | sdkmanager "platforms;android-$ANDROID" script: - ./gradlew clean build after_success: - if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./gradlew uploadArchives -PSONATYPE_USERNAME="${SONATYPE_USERNAME}" -PSONATYPE_PASSWORD="${SONATYPE_PASSWORD}"; fi notifications: email: recipients: - secure: TK+wKR6rBBIZWScbk8u2yNXiGAMPfDsb+CWowQgYwyowp9KXHmCrXKkNYRox4YQ0TJyvaCH9ys+qVmsPPOtA0Liyv5/4zFhM2+31lAqFUniqBGl4ozFNqN8f04vB5jkF8kA44L8Qt4tknaHaRE5k8Z9ENlTf9jNB2P/k6O9uMQzM5cLZF6KI0NUtVHZUMSPQ4BorpsuzWACyin7skLowVfD2m+K+ZK4LH3sYGFL1o1VwMnYSxS4TLZPQRQkUSwPJ7cjtgjlgorPGp84iHjuNA6VC4QzPNoUjjcci6efl8CMBBU5qzF+b0SRriG9bNGd4OPsje3Q4h23MGxxFN37B3uYr9ijylR0khHUdkQiF3U1x+vv6coEk5Ng3SFwXnDrJX9QaxyIQd8mWvhiCgYGnyisY401P1lrAPc4EINZviy6VCiLllH5M7liBX+5lZXxM8Dwon9ZRrtyUbjm3nx1pOuayZW8BWJXW+t316X+Yj0RUNEJMC9GpJKLFy1aeT2EkefTFQvJq82vfiwpqyII9x7te+Fqme0iHkJqg4WVF3VATsPwUyW3YxmbAQjYwAsh/+okeM0sySwSS4h0E7NM7HmQL05is4B5W9XzducWZPA+n8QczW8C7LDvtao8jUO2KVvPntHPjt1qmBR34Iy+pjoE317vHSIlbkgrjtSY8KGI= on_success: always on_failure: always mapsforge-0.10.0/COPYING000066400000000000000000001045131334120277700146200ustar00rootroot00000000000000 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.10.0/COPYING.LESSER000066400000000000000000000167431334120277700156230ustar00rootroot00000000000000 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.10.0/README.md000066400000000000000000000036621334120277700150470ustar00rootroot00000000000000[![Maven Central](https://img.shields.io/maven-central/v/org.mapsforge/mapsforge-core.svg)](https://search.maven.org/search?q=g:org.mapsforge) [![Build Status](https://travis-ci.org/mapsforge/mapsforge.svg?branch=master)](https://travis-ci.org/mapsforge/mapsforge) [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](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](.github/CONTRIBUTING.md) guidelines. If you have any questions or problems, don't hesitate to ask our public [mailing list](https://groups.google.com/group/mapsforge-dev) 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](http://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](http://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). ## Screenshots ### Android ![Android](docs/images/android.png) ### Desktop ![Desktop](docs/images/desktop.png) mapsforge-0.10.0/build.gradle000066400000000000000000000114011334120277700160350ustar00rootroot00000000000000buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' } } def filterProjects(filter) { return subprojects.findAll { project -> filter.contains(project.name) } } allprojects { group = 'org.mapsforge' version = 'master-SNAPSHOT' ext.isReleaseVersion = !version.endsWith("SNAPSHOT") ext.androidBuildVersionTools = "28.0.2" 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 28 } // 14 for Support Library, 16 for sqlite-android static def androidMinSdk() { return 16 } static def androidTargetSdk() { return 22 } static def versionCode() { return 1 } def versionName() { return version } // Configuration injection for all subprojects subprojects { repositories { google() jcenter() maven { url 'https://jitpack.io' } } tasks.withType(JavaCompile) { sourceCompatibility = JavaVersion.VERSION_1_7 targetCompatibility = JavaVersion.VERSION_1_7 } } // Configuration for all plain Java projects project.ext.javalibraryprojects = ["mapsforge-core", "mapsforge-map", "mapsforge-map-awt", "mapsforge-map-reader", "mapsforge-map-writer", "mapsforge-poi", "mapsforge-poi-awt", "mapsforge-poi-writer", "mapsforge-themes"] project.ext.javaprojects = project.javalibraryprojects + ["mapsforge-samples-awt"] configure(filterProjects(project.javalibraryprojects)) { apply plugin: 'maven' if (project.hasProperty("SONATYPE_USERNAME")) { afterEvaluate { project.apply from: "${rootProject.projectDir}/deploy.gradle" } } } configure(filterProjects(project.javaprojects)) { apply plugin: 'java-library' //apply plugin: 'checkstyle' dependencies { testImplementation "junit:junit:$jUnitVersion" } /*checkstyle { showViolations = false // turn on for reporting // as of Gradle 2.2.1 every sub project seems to require a checkstyle file, this // directive forces all projects to use the shared file in the root project configFile = rootProject.file('config/checkstyle/checkstyle.xml') }*/ // set java source encoding, otherwise some tests fail [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' } // Configuration for Android projects project.ext.androidlibraryprojects = ["mapsforge-map-android", "mapsforge-poi-android", "sqlite-android"] project.ext.androidapkprojects = ["mapsforge-samples-android"] project.ext.androidprojects = project.androidlibraryprojects + project.androidapkprojects // TODO get checkstyle and pmd working for android (right now it does not work out of the box, so better wait for official fix) configure(filterProjects(project.androidapkprojects)) { apply plugin: 'com.android.application' } configure(filterProjects(project.androidlibraryprojects)) { apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' android.libraryVariants.all { variant -> def name = variant.buildType.name if (name == "debug") return def task = project.tasks.create "jar${name.capitalize()}", Jar task.dependsOn variant.javaCompiler task.exclude '**/BuildConfig.class' task.exclude '**/R.class' task.exclude '**/R$*.class' task.from variant.javaCompiler.destinationDir artifacts.add('archives', task) } if (project.hasProperty("SONATYPE_USERNAME")) { afterEvaluate { project.apply from: "${rootProject.projectDir}/deploy.gradle" } } } configure(filterProjects(project.androidprojects)) { android { compileSdkVersion androidCompileSdk() buildToolsVersion "$androidBuildVersionTools" compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } defaultConfig { versionCode versionCode() versionName versionName() minSdkVersion androidMinSdk() targetSdkVersion androidTargetSdk() } sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src/main/java'] resources.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } } lintOptions { abortOnError false } } } mapsforge-0.10.0/config/000077500000000000000000000000001334120277700150265ustar00rootroot00000000000000mapsforge-0.10.0/config/checkstyle/000077500000000000000000000000001334120277700171645ustar00rootroot00000000000000mapsforge-0.10.0/config/checkstyle/checkstyle.xml000066400000000000000000000110231334120277700220410ustar00rootroot00000000000000 mapsforge-0.10.0/config/pmd/000077500000000000000000000000001334120277700156065ustar00rootroot00000000000000mapsforge-0.10.0/config/pmd/pmd_ruleset.xml000066400000000000000000000364251334120277700206650ustar00rootroot00000000000000 mapsforge-0.10.0/deploy.gradle000066400000000000000000000056471334120277700162510ustar00rootroot00000000000000apply plugin: 'signing' if (project.hasProperty("android")) { task sourcesJar(type: Jar) { classifier = 'sources' from android.sourceSets.main.java.srcDirs } task javadoc(type: Javadoc) { source = android.sourceSets.main.java.srcDirs classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) } } else { task sourcesJar(type: Jar) { classifier = 'sources' from sourceSets.main.allSource } } task javadocJar(type: Jar, dependsOn: javadoc) { classifier = 'javadoc' from javadoc.destinationDir } artifacts { archives javadocJar archives sourcesJar } signing { required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") } sign configurations.archives } uploadArchives { repositories { mavenDeployer { beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { authentication(userName: SONATYPE_USERNAME, password: SONATYPE_PASSWORD) } snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { authentication(userName: SONATYPE_USERNAME, password: SONATYPE_PASSWORD) } pom.project { packaging 'jar' name 'mapsforge' description 'Vector map library written in Java - running on Android and Desktop.' url 'https://github.com/mapsforge/mapsforge' licenses { license { name 'GNU Lesser GPL' url 'http://www.gnu.org/licenses/lgpl.html' distribution 'repo' } } scm { connection 'scm:git:https://github.com/mapsforge/mapsforge' developerConnection 'scm:git:https://github.com/mapsforge/mapsforge' url 'https://github.com/mapsforge/mapsforge' } 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' } } } } } } mapsforge-0.10.0/docs/000077500000000000000000000000001334120277700145115ustar00rootroot00000000000000mapsforge-0.10.0/docs/Changelog.md000066400000000000000000000452071334120277700167320ustar00rootroot00000000000000# Changelog ## 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) - Many other 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) - Many other 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) - Many other 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) - Many other 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) - 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) - Many other 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) - Many other 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) - Many other 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) - Many other 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. - Many other 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. - Many other 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. - Many other 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. - Many other 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. - Many other 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. - Many other minor improvements and bug fixes. ## Version 0.1.0 (2010-06-27) - First public release, contains the android.map package. mapsforge-0.10.0/docs/Contributors.md000066400000000000000000000006531334120277700175340ustar00rootroot00000000000000The 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. Current owners and lead developers are: - [**Ludwig Brinckmann**](https://github.com/ludwigb) - [**devemux86**](https://github.com/devemux86) To contact the project, please use the [mapsforge mailing list](https://groups.google.com/forum/#!forum/mapsforge-dev). mapsforge-0.10.0/docs/Desktop.md000066400000000000000000000003671334120277700164520ustar00rootroot00000000000000### 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 ``` mapsforge-0.10.0/docs/Getting-Started-Developers.md000066400000000000000000000100751334120277700221510ustar00rootroot00000000000000# 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. If you have any questions or problems, don't hesitate to ask our public [mapsforge-dev](https://groups.google.com/group/mapsforge-dev) mailing list for help. You can also report bugs and improvement requests via our [issue tracker](https://github.com/mapsforge/mapsforge/issues). ## 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. - [sqlite-android](https://sqlite.org/android/): SQLite Android Bindings. 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 'germany.map' onto the sdcard of a device or emulator. - It is probably best if the map contains the area of central Berlin. ### 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](../.github/CONTRIBUTING.md) for repository contributors.mapsforge-0.10.0/docs/Getting-Started-Map-Writer.md000066400000000000000000000333721334120277700220350ustar00rootroot00000000000000# 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. If you have any questions or problems, don't hesitate to ask our public [mapsforge-dev](https://groups.google.com/group/mapsforge-dev) mailing list for help. You can also report bugs and improvement requests via our [issue tracker](https://github.com/mapsforge/mapsforge/issues). ## 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:
  • Mapbox [polylabel](https://github.com/mapbox/polylabel) algorithm
  • JTS [interior point](https://locationtech.github.io/jts/javadoc/org/locationtech/jts/algorithm/InteriorPointArea.html) algorithm (minimal performance overhead)
|
  • true
  • false
|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 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://search.maven.org/search?q=g: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 ### New since 0.9.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.10.0/docs/Integration.md000066400000000000000000000054571334120277700173310ustar00rootroot00000000000000# Integration guide This article describes how to integrate the library in your project, with Gradle / Maven / Jars or SNAPSHOT builds. Current version is [![Maven Central](https://img.shields.io/maven-central/v/org.mapsforge/mapsforge-core.svg)](https://search.maven.org/search?q=g: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]' implementation 'net.sf.kxml:kxml2:2.3.0' ``` #### Android ```groovy implementation 'org.mapsforge:mapsforge-map-android:[CURRENT-VERSION]' implementation 'com.caverock:androidsvg:1.3' ``` #### Desktop ```groovy repositories { maven { url 'https://jitpack.io' } } implementation 'org.mapsforge:mapsforge-map-awt:[CURRENT-VERSION]' implementation 'com.github.blackears:svgSalamander:v1.1.1' ``` ### 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]' implementation 'org.mapsforge:sqlite-android:[CURRENT-VERSION]' implementation 'org.mapsforge:sqlite-android:[CURRENT-VERSION]:natives-armeabi-v7a' implementation 'org.mapsforge:sqlite-android:[CURRENT-VERSION]:natives-arm64-v8a' implementation 'org.mapsforge:sqlite-android:[CURRENT-VERSION]:natives-x86' implementation 'org.mapsforge:sqlite-android:[CURRENT-VERSION]:natives-x86_64' ``` #### Desktop ```groovy implementation 'org.mapsforge:mapsforge-poi-awt:[CURRENT-VERSION]' implementation 'org.xerial:sqlite-jdbc:3.20.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.mapsforge mapsforge-core [CURRENT-VERSION] ``` ## Jars You can find release and snapshot jars (regular and with dependencies) in [Maven Central](https://search.maven.org/search?q=g: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.10.0/docs/LabelLayer.md000066400000000000000000000147551334120277700170630ustar00rootroot00000000000000The 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.10.0/docs/MapCreation.md000066400000000000000000000151721334120277700172430ustar00rootroot00000000000000# 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. ![Screenshot MultiMap1](images/multimap1.png) ## 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 his [OpenStreetMap Data](http://openstreetmapdata.com/) site, specifically the set: http://data.openstreetmapdata.com/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 2.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 python 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](http://openstreetmapdata.com/), specifically the http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip variant. The process is completed successfully in some minutes giving the map in our [server](http://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.10.0/docs/MapDataStore.md000066400000000000000000000072031334120277700173610ustar00rootroot00000000000000# The MapDataStore Interface An introduction to the new MapDataStore interface. ![Screenshot MultiMap1](images/multimap1.png) 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 very costly to eliminate duplicates and generally cheaper to render overlapping data twice, so the use of this policy is discouraged. ## 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. ![Screenshot MultiMap1](images/multimap2.png) ## 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.10.0/docs/Mapsforge-Applications.md000066400000000000000000000163271334120277700214130ustar00rootroot00000000000000# 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 | | [Cruiser](http://wiki.openstreetmap.org/wiki/Cruiser) | Android / Desktop map and navigation application | Proprietary/Free | Closed | | [c:geo](https://github.com/cgeo/) | 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-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 | | [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 | | [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](http://junjunguo.com/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 | | [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 | | [Watertrack ECO](http://watertrack.de/) | GPS Tracking on Germany Waterways | Proprietary/Free | Closed | | [Wikiloc](http://www.wikiloc.com/outdoor-navigation-app) | Map Viewer & Track recording/following | Proprietary/Free (in-app purchases) | Closed | You know an application that is missing here? Please inform us by sending a message via our public [mailing list](https://groups.google.com/group/mapsforge-dev). mapsforge-0.10.0/docs/Mapsforge-Maps.md000066400000000000000000000010731334120277700176550ustar00rootroot00000000000000# Mapsforge map providers (in lexical order) - [AndroidMaps](http://www.androidmaps.co.uk/) - [Freizeitkarte](http://www.freizeitkarte-osm.de/android/en/index.html) - [Kurviger](https://offline-maps.kurviger.de/) - [Locusvectormaps](http://www.locusvectormaps.com) - [Mapsforge](http://download.mapsforge.org/) - [OpenAndroMaps](http://www.openandromaps.org/en/) - [OpenMaps](http://openmaps.eu/) You know a Mapsforge map provider that is missing here? Please inform us by sending a message via our public [mailing list](https://groups.google.com/group/mapsforge-dev). mapsforge-0.10.0/docs/Mapsforge-Talks.md000066400000000000000000000024241334120277700200340ustar00rootroot00000000000000# 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.10.0/docs/POI.md000066400000000000000000000201741334120277700154660ustar00rootroot00000000000000# POI API This article describes how to use the POI API in mapsforge POI library (from `prototypes` branch). If you have any questions or problems, don't hesitate to ask our public [mapsforge-dev](https://groups.google.com/group/mapsforge-dev) mailing list for help. You can also report bugs and improvement requests via our [issue tracker](https://github.com/mapsforge/mapsforge/issues). ## 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. For efficiency reasons Android's SQLite implementation is not used. Instead [SQLite Android Bindings](https://sqlite.org/android/) is used to provide an SQLite implementation with [R-tree](https://sqlite.org/rtree.html) functionality. All reading and writing operations are done via classes implementing the `PoiPersistenceManager` interface. This allows adding, removing and changing POIs at any time. 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://search.maven.org/search?q=g: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|true| |`ways`|Also parse ways.|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 http://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 - Virtual & shadow correlated tables holding the R-tree index - `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
| mapsforge-0.10.0/docs/Project-Conventions.md000066400000000000000000000057541334120277700207570ustar00rootroot00000000000000# Description of important conventions in the mapsforge project. # Project conventions Our project conventions are based on the official [Code Conventions for the Java Programming Language](http://www.oracle.com/technetwork/java/codeconv-138413.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](http://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.10.0/docs/ReleaseProcedures.md000066400000000000000000000027401334120277700204520ustar00rootroot00000000000000# 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 ---------------------------- ``` gradlew -Dorg.gradle.parallel=false uploadArchives ``` 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.10.0/docs/Rendertheme.md000066400000000000000000000420121334120277700172740ustar00rootroot00000000000000# RenderTheme **This article describes how to use XML-based renderthemes to style maps, including the extensions of Rendertheme V4 or newer (new with release 0.5).** If you have any questions or problems, don't hesitate to ask our public [mapsforge-dev](https://groups.google.com/group/mapsforge-dev) mailing list for help. You can also report bugs and improvement requests via our [issue tracker](https://github.com/mapsforge/mapsforge/issues). ## 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 OpenStreetMap tag.