This commit is contained in:
Zsolt Ero
2024-06-12 14:53:01 +02:00
parent 191b5daba8
commit 791ad896b2
11 changed files with 145 additions and 213 deletions

1
.gitignore vendored
View File

@@ -19,3 +19,4 @@ venv
/pnpm-lock.yaml
/astro_blog

View File

@@ -3,6 +3,16 @@ const config = {
semi: false,
singleQuote: true,
arrowParens: 'avoid',
plugins: ['prettier-plugin-astro'],
overrides: [
{
files: '*.astro',
options: {
parser: 'astro',
},
},
],
}
module.exports = config

View File

@@ -1,5 +1,6 @@
{
"dependencies": {
"prettier": "^3.2.4"
"prettier": "^3.2.4",
"prettier-plugin-astro": "^0.14.0"
}
}

View File

@@ -1,90 +1,2 @@
## What is OpenFreeMap?
OpenFreeMap provides free map hosting so you can display custom maps on your website and apps.
It is 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 is truly **open-source**: everything, including the full production setup, is on [GitHub](https://github.com/hyperknot/openfreemap). Map data is from OpenStreetMap.
## How can I use it?
(Click below, it's interactive!)
<!--map_howto-->
## 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 here:
<!--support_plans-->
On **Gold** level and above, we offer personalised technical support by email. Otherwise, support is via GitHub [Discussions](https://github.com/hyperknot/openfreemap/discussions).
If we ever receive a **Diamond** level supporter, we'll put their logo on this page.
When subscribing to a support plan, you receive an invoice for each of your payments.
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.
## Who is behind this project?
I'm Zsolt Ero ([X](https://x.com/hyperknot), [blog](https://blog.hyperknot.com/), [email](mailto:zsolt@openfreemap.org)). I built [MapHub](https://maphub.net/) and have been running map hosting in production for 8 years.
## Why did you build this project?
OpenStreetMap is one of the most important collective projects in history. It began 20 years ago, and today, 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://x.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 that no one was going to do it. So, I thought I might use my map hosting experience and build 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 map hosting costs 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?
X: [hyperknot](https://x.com/hyperknot) and [OpenFreeMapOrg](https://x.com/OpenFreeMapOrg)
GitHub: [openfreemap](https://github.com/hyperknot/openfreemap) and [openfreemap-styles](https://github.com/hyperknot/openfreemap-styles)
## What is the tech stack?
There is no tile server running; only Btrfs partition images with 300 million hard-linked files. This was my idea; I haven't read about anyone else doing this in production, but it works really well. (You can read more about it on [GitHub](https://github.com/hyperknot/openfreemap).
There is no cloud, just dedicated servers. The HTTPS server is nginx on Ubuntu.
Special thanks go to [Michael Barry](https://github.com/msbarry) for developing [Planetiler](https://github.com/onthegomap/planetiler). It made it possible to generate the tiles in 5 hours instead of 5 weeks. The map schema is [OpenMapTiles](https://github.com/openmaptiles/openmaptiles).
The [styles](https://github.com/hyperknot/openfreemap-styles) are forked and heavily modified.
## Domains
`tiles.openfreemap.org` - Cloudflare proxied
`direct.openfreemap.org` - direct connection, Round-Robin DNS
## Attribution
Attribution is required. If you are using MapLibre, they are automatically added, you have nothing to do.
If you are using alternative clients, or if you are using this in printed media or video, you must add the following attribution:
<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,7 @@
On **Gold** level and above, we offer personalised technical support by email. Otherwise, support is via GitHub [Discussions](https://github.com/hyperknot/openfreemap/discussions).
If we ever receive a **Diamond** level supporter, we'll put their logo on this page.
When subscribing to a support plan, you receive an invoice for each of your payments.
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.

View File

@@ -0,0 +1,63 @@
## Is commercial usage allowed?
Yes.
## Who is behind this project?
I'm Zsolt Ero ([X](https://x.com/hyperknot), [blog](https://blog.hyperknot.com/), [email](mailto:zsolt@openfreemap.org)). I built [MapHub](https://maphub.net/) and have been running map hosting in production for 8 years.
## Why did you build this project?
OpenStreetMap is one of the most important collective projects in history. It began 20 years ago, and today, 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://x.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 that no one was going to do it. So, I thought I might use my map hosting experience and build 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 map hosting costs 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?
X: [hyperknot](https://x.com/hyperknot) and [OpenFreeMapOrg](https://x.com/OpenFreeMapOrg)
GitHub: [openfreemap](https://github.com/hyperknot/openfreemap) and [openfreemap-styles](https://github.com/hyperknot/openfreemap-styles)
## What is the tech stack?
There is no tile server running; only Btrfs partition images with 300 million hard-linked files. This was my idea; I haven't read about anyone else doing this in production, but it works really well. (You can read more about it on [GitHub](https://github.com/hyperknot/openfreemap).
There is no cloud, just dedicated servers. The HTTPS server is nginx on Ubuntu.
Special thanks go to [Michael Barry](https://github.com/msbarry) for developing [Planetiler](https://github.com/onthegomap/planetiler). It made it possible to generate the tiles in 5 hours instead of 5 weeks. The map schema is [OpenMapTiles](https://github.com/openmaptiles/openmaptiles).
The [styles](https://github.com/hyperknot/openfreemap-styles) are forked and heavily modified.
## Domains
`tiles.openfreemap.org` - Cloudflare proxied
`direct.openfreemap.org` - direct connection, Round-Robin DNS
## Attribution
Attribution is required. If you are using MapLibre, they are automatically added, you have nothing to do.
If you are using alternative clients, or if you are using this in printed media or video, you must add the following attribution:
<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,44 @@
---
interface Props {
title: string
}
const { title } = Astro.props
import '../styles/global.css'
---
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{title}</title>
<meta
name="description"
content="Open and free custom maps for your website and apps, based on OpenStreetMap."
/>
<meta name="generator" content={Astro.generator} />
<!-- <meta property="og:title" content="" />-->
<!-- <meta property="og:type" content="" />-->
<!-- <meta property="og:url" content="" />-->
<!-- <meta property="og:image" content="" />-->
<!-- <link rel="icon" href="/favicon.ico" sizes="any" />-->
<!--<link rel="icon" type="image/svg+xml" href="/favicon.svg" />-->
<!--<link href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css" rel="stylesheet" />-->
<!--<link href="https://unpkg.com/nouislider@15.7.1/dist/nouislider.min.css" rel="stylesheet" />-->
<!--<link href="https://unpkg.com/prismjs@1.29.0/themes/prism.min.css" rel="stylesheet" />-->
</head>
<body>
<slot />
<div class="footer">
<a href="privacy">Privacy Policy</a>
<a href="tos">Terms of Service</a>
</div>
</body>
</html>

View File

@@ -1,4 +1,3 @@
<input type="checkbox" id="col1" class="col-chk" />
<label for="col1" class="col-lbl">How to load MapLibre?</label>
<div class="col-cnt">
@@ -107,4 +106,4 @@
</p>
</div>
</div>
</div>
</div>

View File

@@ -2,19 +2,9 @@
import Layout from '../layouts/Layout.astro'
import Map from '../components/Map.astro'
import { getCollection } from 'astro:content'
import { getEntry } from 'astro:content'
import { Content as WhatIs } from '../content/index/whatis.md'
//
// const content = await getCollection('index');
// const snippets = {}
//
// for (const cont of content) {
// const {Content} = await cont.render()
// snippets[cont.slug] = Content
// }
import { Content as Pricing } from '../content/index/pricing.md'
import { Content as Rest } from '../content/index/rest.md'
---
<Layout title="OpenFreeMap">
@@ -45,23 +35,11 @@ import { Content as WhatIs } from '../content/index/whatis.md'
</p>
<div id="support-plans-slider"></div>
<p>
On <strong>Gold</strong> level and above, we offer personalised technical support by email. Otherwise,
support is via GitHub <a href="https://github.com/hyperknot/openfreemap/discussions"
>Discussions</a
>.
</p>
<p>
If we ever receive a <strong>Diamond</strong> level supporter, we'll put their logo on this page.
</p>
<p>When subscribing to a support plan, you receive an invoice for each of your payments.</p>
<p>
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.
</p>
<Pricing />
<h2>Is commercial usage allowed?</h2>
<p>Yes.</p>
<h2>Who is behind this project?</h2>
<p>
I'm Zsolt Ero (<a href="https://x.com/hyperknot">X</a>, <a href="https://blog.hyperknot.com/"
@@ -70,101 +48,8 @@ import { Content as WhatIs } from '../content/index/whatis.md'
>MapHub</a
> and have been running map hosting in production for 8 years.
</p>
<h2>Why did you build this project?</h2>
<p>
OpenStreetMap is one of the most important collective projects in history. It began 20 years
ago, and today, 3 million edits are made each day!
</p>
<p>
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 <a
href="https://x.com/levelsio/status/1730659933232730443">did</a
>.
</p>
<p>You can try self-hosting, but it requires a big server and a lot of time to get it right.</p>
<p>
I waited for years for someone to offer this service but realized that no one was going to do
it. So, I thought I might use my map hosting experience and build it myself.
</p>
<p>
I'll share more about the reasons in a future <a href="https://blog.hyperknot.com/">blog post</a
>. Feel free to subscribe.
</p>
<h2>How can this work? How can a one-person project offer unlimited map hosting for free?</h2>
<p>
There is no technical reason why map hosting costs 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.
</p>
<p>
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.
</p>
<p>
If this project helps you save on your map hosting costs, please consider subscribing to a
support plan.
</p>
<h2>How can I follow this project?</h2>
<p>
X: <a href="https://x.com/hyperknot">hyperknot</a> and <a href="https://x.com/OpenFreeMapOrg"
>OpenFreeMapOrg</a
>
</p>
<p>
GitHub: <a href="https://github.com/hyperknot/openfreemap">openfreemap</a> and <a
href="https://github.com/hyperknot/openfreemap-styles">openfreemap-styles</a
>
</p>
<h2>What is the tech stack?</h2>
<p>
There is no tile server running; only Btrfs partition images with 300 million hard-linked files.
This was my idea; I haven't read about anyone else doing this in production, but it works really
well. (You can read more about it on <a href="https://github.com/hyperknot/openfreemap"
>GitHub</a
>.
</p>
<p>There is no cloud, just dedicated servers. The HTTPS server is nginx on Ubuntu.</p>
<p>
Special thanks go to <a href="https://github.com/msbarry">Michael Barry</a> for developing <a
href="https://github.com/onthegomap/planetiler">Planetiler</a
>. It made it possible to generate the tiles in 5 hours instead of 5 weeks. The map schema is <a
href="https://github.com/openmaptiles/openmaptiles">OpenMapTiles</a
>.
</p>
<p>
The <a href="https://github.com/hyperknot/openfreemap-styles">styles</a> are forked and heavily modified.
</p>
<h2>Domains</h2>
<p>
<code>tiles.openfreemap.org</code> - Cloudflare proxied<br />
<code>direct.openfreemap.org</code> - direct connection, Round-Robin DNS
</p>
<h2>Attribution</h2>
<p>
Attribution is required. If you are using MapLibre, they are automatically added, you have
nothing to do.
</p>
<p>
If you are using alternative clients, or if you are using this in printed media or video, you
must add the following attribution:
</p>
<p>
<a href="https://openfreemap.org" target="_blank">OpenFreeMap</a>
<a href="https://www.openmaptiles.org/" target="_blank">© OpenMapTiles</a> Data from <a
href="https://www.openstreetmap.org/copyright"
target="_blank">OpenStreetMap</a
>
</p>
<p>You do not need to display the OpenFreeMap part, but it is nice if you do.</p>
<h2>License</h2>
<p>
The license of this project is <a href="https://www.tldrlegal.com/license/mit-license">MIT</a>.
Map data is from <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>. The
licenses for included projects are listed in <a
href="https://github.com/hyperknot/openfreemap/blob/main/LICENSE.md">LICENSE.md</a
>.
</p>
<Rest />
<!--<script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>-->
<!--<script src="https://unpkg.com/nouislider@15.7.1/dist/nouislider.min.js"></script>-->

View File

@@ -1,3 +1,8 @@
---
layout: '../layouts/Static.astro'
title: 'Privacy Policy'
---
# OpenFreeMap and your data
Version: 16th of Jan, 2024

View File

@@ -1,3 +1,8 @@
---
layout: '../layouts/Static.astro'
title: 'Terms of Services'
---
# TERMS OF SERVICES
Version: 16th of Jan, 2024