This commit is contained in:
Zsolt Ero
2024-01-16 20:53:31 +01:00
parent 4114cdda6c
commit cb18657ec0
9 changed files with 175 additions and 22 deletions

101
website/blocks/main.md Normal file
View File

@@ -0,0 +1,101 @@
## What is OpenFreeMap?
OpenFreeMap allows you to display custom maps on your website and apps.
It's truly **free**: there are no limits on the number of map views or requests you can make, nor on how you use your map. There is no registration page, user database, API keys, or cookies.
It's truly **open-source**: everything, including the full production setup, is on [GitHub](https://github.com/hyperknot/openfreemap). Map data is from OpenStreetMap.
## Who is behind this project?
I'm Zsolt Ero ([twitter](https://twitter.com/hyperknot), [blog](https://blog.hyperknot.com/)). I built [MapHub](https://maphub.net/) and have been running map hosting in production for 8 years.
## How can I use it?
<!--map_docs-->
## How can I donate or support this project?
If this project helps you save on your map hosting costs, please subscribe to one of our support plans.
<!--support plan-->
The reason we are offering support plans rather than "Donate Now" buttons is that accounting for business donations can be very difficult for both sides. The aim of the subscription plans is to support this project by covering the server costs and the hours we put into it.
As a bonus, on **Silver** level and above, we can offer personalised technical support by email.
If we ever receive a **Diamond** level supporter, we'll put their logo on this page.
Note: if you want to make a single donation, feel free to cancel after the first payment. However, please understand that the nature of this project needs recurring donations to cover the server costs.
## Is commercial usage allowed?
Yes.
## Why did you make this project?
OpenStreetMap is one of the most important collective projects in history. It's soon 20 years old and 3 million edits are made each day.
Unfortunately, when you want to use the map on your website or app, you need to look for a commercial map tile provider and hope your site doesn't become too popular. Otherwise, you might end up with a $10,000 bill in a single day, as Hoodmaps did [\*](https://twitter.com/levelsio/status/1730659933232730443).
You can try self-hosting, but it requires a big server and a lot of time to get it right.
I waited for years for someone to offer this service but realized no one was going to make it. So, I thought I might use my map hosting experience and do it myself.
I'll share more about the reasons in a future [blog post](https://blog.hyperknot.com/). Feel free to subscribe.
## How can this work? How can a one-person project offer unlimited map hosting for free?
There is no technical reason why vector tile hosting should cost as much as it does today. Vector tiles are just static files. OK, serving 300 million files is not easy, but at the end of the day, they are just files.
Financially, the plan is to keep renting servers until they cover the bandwidth. I believe it can be self-sustainable if enough people subscribe to the support plans.
If this project helps you save on your map hosting costs, please consider subscribing to a support plan!
## How can I follow this project?
twitter: [hyperknot](https://twitter.com/hyperknot) and [OpenFreeMapOrg](https://twitter.com/OpenFreeMapOrg)
The main repo is [hyperknot/openfreemap](https://github.com/hyperknot/openfreemap)
Styles are at [hyperknot/openfreemap-styles](https://github.com/hyperknot/openfreemap-styles)
mastodon zsolt https://elk.zone/sigmoid.social/@hyperknot/followers
mastodon ofm TODO
## What is the tech stack?
The map schema is [OpenMapTiles](https://github.com/openmaptiles/openmaptiles).
The tiles are generated by [Planetiler](https://github.com/onthegomap/planetiler).
There is no tile server running, only BTRFS partition images with 300 million hard-linked files. This is probably the most innovative aspect of this project.
The server is nginx on Ubuntu.
There is no cloud, just dedicated servers at Hetzner.
Currently, it is behind Cloudflare, but it has been designed so that it can be changed at any time.
Moreover, a lot of work is going into customizing the [styles](https://github.com/hyperknot/openfreemap-styles).
## What about PMTiles?
I would have loved to use PMTiles; they are a brilliant idea!
Unfortunately, making range requests in 80 GB files just doesn't work in production. It is fine for files smaller than 500 MB, but it has terrible latency and caching issues for full planet datasets.
## Attribution
If you are using MapLibre, attributions are automatically added.
If you are using this in printed media or video, please attribute:
<a href="https://openfreemap.org/" target="_blank">OpenFreeMap</a> <a href="https://www.openmaptiles.org/" target="_blank">&copy; OpenMapTiles</a> Data from <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a>
You do not need to display the OpenFreeMap part, but it is nice if you do.
## License
The license of this project is [MIT](https://www.tldrlegal.com/license/mit-license). Map data is from [OpenStreetMap](https://www.openstreetmap.org/copyright). The licenses for included projects are listed in [LICENSE.md](https://github.com/hyperknot/openfreemap/blob/main/LICENSE.md).

View File

@@ -0,0 +1,122 @@
<div id="map"></div>
<p>
Choose a style:
<button onclick="selectStyle('bright')">Bright</button>
<button onclick="selectStyle('liberty')">Liberty</button>
<button onclick="selectStyle('positron')">Positron</button>
</p>
<p style="margin-bottom: 2em">
Use the following style in a MapLibre map:
<code id="style-url-code">https://tiles.openfreemap.org/styles/liberty</code>
</p>
<input type="checkbox" id="col1" class="col-chk" />
<label for="col1" class="col-lbl">How to load MapLibre?</label>
<div class="col-cnt">
<p>
Include
<a href="https://maplibre.org/maplibre-gl-js/docs/" target="_blank">MapLibre GL JS</a> in the
<code>&lt;head&gt;</code>. If you are using npm, you can install the
<code>maplibre-gl</code> package. Make sure to import the CSS as well.
</p>
<pre><code class="language-html">&lt;script src=&quot;https://unpkg.com/maplibre-gl/dist/maplibre-gl.js&quot;&gt;&lt;/script&gt;
&lt;link
href=&quot;https://unpkg.com/maplibre-gl/dist/maplibre-gl.css&quot;
rel=&quot;stylesheet&quot;
/&gt;
</code></pre>
<p>Initialize it to a div like this:</p>
<pre><code class="language-html">&lt;div id=&quot;map&quot; style=&quot;width: 100%; height: 500px&quot;&gt;&lt;/div&gt;
&lt;script&gt;
const map = new maplibregl.Map({
style: 'https://tiles.openfreemap.org/styles/liberty',
center: [-0.114, 51.506],
zoom: 14.2,
container: 'map'
})
&lt;/script&gt;
</code></pre>
</div>
<div>
<input type="checkbox" id="col2" class="col-chk" />
<label for="col2" class="col-lbl">Using Mapbox?</label>
<div class="col-cnt">
<p>
If you are currently using Mapbox, please change your libraries to
<a href="https://maplibre.org/maplibre-gl-js/docs/" target="_blank">MapLibre GL JS</a>.
MapLibre is based on the last open-source version of Mapbox GL JS before it went
closed-source. Migrating should be as simple as changing the libraries, as long as you are not
using any features specific to the 2.x or later releases.
</p>
</div>
</div>
<div>
<input type="checkbox" id="col3" class="col-chk" />
<label for="col3" class="col-lbl">Using Leaflet?</label>
<div class="col-cnt">
<p>A Leaflet-based snippet is coming soon.</p>
</div>
</div>
<div>
<input type="checkbox" id="col4" class="col-chk" />
<label for="col4" class="col-lbl">Mobile Apps</label>
<div class="col-cnt">
<p>
For mobile apps, you can use the same styles with
<a href="https://maplibre.org/" target="_blank">MapLibre Native</a>.
</p>
</div>
</div>
<div>
<input type="checkbox" id="col6" class="col-chk" />
<label for="col6" class="col-lbl">Custom styles</label>
<div class="col-cnt">
<p>
You can customize the styles using the
<a href="https://maputnik.github.io/" target="_blank">Maputnik</a> editor. For example, you
can remove labels, POIs, or change colors.
</p>
<p>
When you use a customized style, you need to host the style JSON yourself and use its URL in
MapLibre.
</p>
<p>
<a
href="https://maputnik.github.io/editor?style=https://tiles.openfreemap.org/styles/bright"
target="_blank"
>Customize Bright</a
>
</p>
<p>
<a
href="https://maputnik.github.io/editor?style=https://tiles.openfreemap.org/styles/liberty"
target="_blank"
>Customize Liberty</a
>
</p>
<p>
<a
href="https://maputnik.github.io/editor?style=https://tiles.openfreemap.org/styles/positron"
target="_blank"
>Customize Positron</a
>
</p>
</div>
<div>
<input type="checkbox" id="col5" class="col-chk" />
<label for="col5" class="col-lbl">Self-hosting</label>
<div class="col-cnt">
<p>
You can also download our processed planet MBTiles and BTRFS images if you want to self-host
yourself. Details can be found on
<a href="https://github.com/hyperknot/openfreemap" target="_blank">GitHub</a>.
</p>
</div>
</div>
</div>

102
website/blocks/privacy.md Normal file
View File

@@ -0,0 +1,102 @@
# OpenFreeMap and your data
Version: 16th of Jan, 2024
We try to collect as little information as possible for the everyday running of this service.
There are no user accounts, email lists, API keys, cookies or databases.
This page is a static HTML hosted on GitHub pages.
We do not send newsletters. Please follow us on Twitter or GitHub for updates.
The only data we might collect are server logs. Technically, these are disabled by default and are only enabled temporarily to investigate problems with our service.
---
## PRIVACY POLICY
Your privacy is important to us, so Hyperknot Software Kft., a company based in the Hungary, has created the following Privacy Policy ("Policy") to let you know what information we collect when you visit our Site https://openfreemap.org/ ("Site"), why we collect it and how we use it.
The terms "You," "Your," "Yours" and "User" refer to the entity/person/organization using our Site.
When this Policy mentions "We", "Us," and "Our" it refers to Hyperknot Software Kft. and its subsidiaries and affiliates.
This Privacy Policy is governed by our [Terms of Services](https://openfreemap.org/tos).
For any questions regarding this Policy or any requests regarding the processing of personal data, please contact us at privacy@openfreemap.org.
## 1. INFORMATION WE COLLECT AUTOMATICALLY
When you use our Site or contact us directly we may collect information, including your personal information, about the way you act in our Site, the services You use and how You use them.
This information is necessary for the adequate performance of the contract between You and us, to enable us to comply with legal obligations and given our legitimate interest in being able to provide and improve the functionalities of the Site.
- Log data and Device information. We automatically collect log data and device information when you access and use the Site, even if you have not created an Account or logged in. That information includes, among other things: Internet protocol (IP) addresses, Browser type, Referring/exit pages, Date/time stamp, Operating system.
## 2. THE WAY WE USE YOUR INFORMATION
We process your information adhering to the general data processing principles.
We may use the information we collect through our Site for a number of reasons, including to:
- to ensure data security and prevent fraud
- to improve services
We will normally collect personal information from you only where we have your consent to do so, where we need the personal information to perform a contract with you, or where the processing is in our legitimate business interests.
## 3. COOKIES
We do not use cookies or other tracking technologies.
## 4. INFORMATION FROM MINORS
This site and our Services are not intended for or directed to persons under the age of 18. We do not knowingly collect or ask for information from minors. We do not knowingly allow minors to use our Site or Services.
We will delete any information we discover is collected from a minor. Please contact us using the contact details below if you believe we might have information about a minor.
## 5. SENSITIVE INFORMATION
We do not collect sensitive information such as political opinions, religious or philosophical beliefs, racial or ethnic origin, genetic data, biometric data, health data or data related a sexual orientation.
Please do not send, upload, or provide us any sensitive data and contact us using the contact details below if you believe that we might have such information. We have a right to delete any information we believe it might contain sensitive data.
## 6. PAYMENT INFORMATION
To order and use our services we may require you to provide certain financial information to facilitate the processing of payments. We will not store or collect your payment card details. That information is provided directly to our third-party payment processors whose use of your Personal information is governed by their Privacy Policy. All payment data is stored by Paddle, Lemon Squeezy. You may find their privacy policy link(s) here: [https://www.paddle.com/legal/privacy](https://www.paddle.com/legal/privacy) [https://www.lemonsqueezy.com/privacy](https://www.lemonsqueezy.com/privacy).
## 7. RETENTION
We retain your personal information to provide services to you and as otherwise necessary to comply with our legal obligation, resolve disputes, and enforce our agreements.
We will retain your personal information as long as we need it to provide services to you, unless we are otherwise required by law or regulations to retain your personal information longer.
## 8. SECURITY
We have implemented security measures designed to protect the personal information you share with us, including physical, electronic and procedural measures. Among other things, we regularly monitor our systems for possible vulnerabilities and attacks.
Regardless of the measures and efforts taken by us, the transmission of information via internet, email or text message is not completely secure. We do not guarantee the absolute protection and security of your personal information.
We therefore encourage you to avoid providing us or anyone with any sensitive information of which you believe its disclosure could cause you substantial or irreparable harm.
If you have any questions regarding the security of our Site or Services, you are welcome to contact us at security@openfreemap.org.
## 9. YOUR RIGHTS
You are entitled to a range of rights regarding the protection of your personal information. Those rights are:
- The right to access the information we have about you. If you wish to access your personal information that we collect, you can do so at any time by contacting us using the contact details provided below.
- The right to rectify inaccurate information about you. You can correct, update or request deletion of your personal information by contacting us using the contact details provided below.
- The right to object the processing. When we rely on your consent to process your personal information, you may withdraw consent at any time by contacting us using the contact details provided below. This will not affect the lawfulness of processing prior to the withdrawal of your consent.
- The right to lodge a complaint. You can raise questions or complaints to the national Data Protection Agency in your country of residence in the event where your rights may have been infringed. However, we recommend attempting to reach a peaceful resolution of the possible dispute by contacting us first.
- The right to erase any data concerning you. You may demand erasure of data without undue delay for legitimate reasons, e.g. where data is no longer necessary for the purposes it was collected, or where the data has been unlawfully processed.
## 10. APPLICATION OF POLICY
This Policy applies only to the services offered by our Company. Our Policy does not apply to services offered by other companies or individuals, including products or sites that may be displayed to you in search results, sites that may include our services or other sites linked from our Site or Services.
## 11. AMENDMENTS
Our Policy may change from time to time. We will post any Policy changes on our Site and, if the changes are significant, we may consider providing a more explicit notice (including, for certain services, email notification of Policy changes).
## 12. ACCEPTANCE OF THIS POLICY
We assume that all Users of this Site have carefully read this document and agree to its contents. If someone does not agree with this Policy, they should refrain from using our Site. We reserve the right to change our Policy at any time and inform by using the way as indicated in Section 11. Continued use of this Site implies acceptance of the revised Policy.
## 13. FURTHER INFORMATION
If you have any further questions regarding the data we collect, or how we use it, then please feel free to contact us at the details as indicated above.