diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml
index c99e130..7f4ac66 100644
--- a/.github/workflows/static.yml
+++ b/.github/workflows/static.yml
@@ -4,7 +4,7 @@ name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
- branches: ["main"]
+ branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
@@ -18,7 +18,7 @@ permissions:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
- group: "pages"
+ group: 'pages'
cancel-in-progress: false
jobs:
diff --git a/LICENSE.md b/LICENSE.md
index b70bbf6..2b0594f 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -4,21 +4,21 @@ The license of this project is [MIT](https://www.tldrlegal.com/license/mit-licen
Map data is from [OpenStreetMap](https://www.openstreetmap.org/copyright).
-[OpenMapTiles](https://github.com/openmaptiles/openmaptiles) code is released under the [BSD 3-Clause License](https://tldrlegal.com/license/bsd-3-clause-license-(revised)), design under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). [LICENSE.md](https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md).
+[OpenMapTiles](https://github.com/openmaptiles/openmaptiles) code is released under the [BSD 3-Clause License]( OpenFreeMap is an open and free OpenStreetMap tile hosting service. It's truly free: there is no limit on the amount of map views or requests you can make or how you use your map. There is no registration page, user database, API keys nor cookies. It's truly open source: everything, including the full production setup is on GitHub. OpenStreetMap is one of the most important collective projects in history. More than 2 million users have contributed to it over 19 years; 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 get too popular, otherwise you might end up with a $10,000 bill in a single day, like Hoodmaps did *. You can try self-hosting, but it requires a big server and a lot of time to get it right. I'm Zsolt Ero (twitter, blog). I've created MapHub and I've been running map hosting in production for 8 years. Include MapLibre GL JS in OpenFreeMap is an open and free OpenStreetMap tile hosting service.
+ It's truly free: there is no limit on the amount of map views or requests you can make or how
+ you use your map. There is no registration page, user database, API keys nor cookies.
+ It's truly open source: everything, including the full production setup is on GitHub.
+ OpenStreetMap is one of the most important collective projects in history. More than 2 million
+ users have contributed to it over 19 years; 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 get too popular, otherwise you might
+ end up with a $10,000 bill in a single day, like Hoodmaps did
+ *.
+ You can try self-hosting, but it requires a big server and a lot of time to get it right.
+ I'm Zsolt Ero (twitter,
+ blog). I've created
+ MapHub and I've been running map hosting in production for 8
+ years.
+
+ Include MapLibre GL JS in
+ And initialize it to a div, like this: And initialize it to a div, like this:
+ If you've used Mapbox GL before, please migrate to MapLibre. It is based on the last
+ open-source version of Mapbox GL, before it went closed-source. A Leaflet based snippet is
+ coming soon.
+
+ For mobile apps, you can do the same with MapLibre Native.
+
+ You can also download our processed planet MBTiles and BTRFS images if you want to self-host
+ yourself. Details are in the GitHub at
+ hyperknot/openfreemap.
+ ...
+ The main repo is hyperknot/openfreemap
+
+ Styles are at
+ hyperknot/openfreemap-styles
+ twitter: @hyperknot twitter: @OpenFreeMapOrg mastodon zsolt https://elk.zone/sigmoid.social/@hyperknot/followers mastodon ofm TODO Yes.
+ Because I waited for years for someone to offer this service, but realised no one is going to
+ make it. So, I thought I might use my map hosting experience and do it.
+
+ I'll share more about the why in a blog post in the future, feel free to subscribe on the
+ links above.
+
+ 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 buying Hetzner servers until they cover the bandwidth. I
+ believe it can work if enough people contribute. If this project helps you save your map
+ hosting costs, please consider our support plans!
+
+ The map schema is OpenMapTiles.
+
+ The tiles are generated by Planetiler.
+
+ There is no tile server running, only BTRFS partition images with 300 million hard linked
+ files.
+ The server is nginx on Ubuntu. There is no cloud, just dedicated servers on Hetzner. Currently using Cloudflare, but it's designed so that it can be changed any time.
+ Moreover, a lot of work is going into customising the styles at
+ openfreemap-styles.
+ I would have loved to use PMTiles, they are a brilliant idea!
+ Unfortunately, making range requests in 80 GB files is just not working in production. They
+ are fine for < 500 MB files, but have terrible latency and caching issues for full planet
+ datasets.
+ If you are using MapLibre, attributions are automatically added. If you are using this in a printed media or video, please attribute:
+ OpenFreeMap
+ © OpenMapTiles Data from
+ OpenStreetMap
+ You don't need to display the OpenFreeMap part, but it's nice if you do.
+ The license of this project is
+ MIT.
+ Map data is from OpenStreetMap.
+ OpenMapTiles code is released under
+ the
+ BSD 3-Clause License, design under CC BY 4.0.
+ LICENSE.md.
+
+ Fork from
+ openmaptiles/osm-bright-gl-style. The OSM Bright GL Style is derived from
+ Mapbox Open Styles. The OSM Bright GL
+ Style’s code is released under the
+ BSD 3-Clause License. The OSM Bright GL Style’s design is released under
+ CC BY 4.0.
+ LICENSE.md.
+
+ Fork from maputnik/osm-liberty. OSM
+ Liberty is a fork of OSM Bright. The OSM Bright GL Style is derived from
+ Mapbox Open Styles. The OSM Bright GL
+ Style’s code is released under the
+ BSD 3-Clause License. The OSM Bright GL Style’s design is released under
+ CC BY 4.0.
+ LICENSE.md.
+
+ Fork from
+ openmaptiles/positron-gl-style. The Positron GL Style is derived from
+ CartoDB Basemaps designed by Stamen
+ and Paul Norman for CartoDB Inc., licensed under
+ CC BY 3.0. The Positron GL style’s
+ code is released under the
+ BSD 3-Clause License. The Positron GL Style’s design is released under
+ CC BY 4.0.
+ LICENSE.md.
+
+ Noto Sans is released under the
+ SIL Open Font License, Version 1.1
+
+ The Maki POI icon set is
+ licensed under CC0 1.0 Universal.
+
+ The right arrow was derived from
+ Wikipedia, it is public
+ domain.
+
+ Natural Earth map data is in the public
+ domain.
+
+ spritezero-cli is from
+ mapbox/spritezero-cli, licensed
+ ISC.
+
-OpenFreeMap
-What is this?
-Why is this important?
-Who is behind this project?
-How can I use it?
-<head><script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
+
+
+ OpenFreeMap
+ What is this?
+ Why is this important?
+ Who is behind this project?
+ How can I use it?
+
+
+ <head>
+
-<script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
<link
href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css"
rel="stylesheet"
/>
<div id="map" style="width: 600px; height: 400px"></div>
-
+
-
+ <div id="map" style="width: 100%; height: 500px"></div>
<script>
const map = new maplibregl.Map({
- style: "https://tiles.openfreemap.org/styles/liberty",
- center: [-74.5, 40],
- zoom: 9,
- container: "map",
- });
+ style: 'https://tiles.openfreemap.org/styles/liberty',
+ center: [-0.114, 51.506],
+ zoom: 14.2,
+ container: 'map'
+ })
</script>
How can I donate or support this project?
+ How can I follow this project?
+ Is commercial usage allowed?
+ Why did I make this?
+ How can this work? How can a one person project offer unlimited map hosting for free?
+ What is the tech stack?
+ What about PMTiles?
+ Attribution
+ Licenses
+ Styles
+ Bright
+ Liberty
+ Positron
+ Fonts
+ Icons
+ Natural Earth
+ Tools
+
If you've used Mapbox GL before, please migrate to MapLibre. It is based on the last open-source version of Mapbox GL, before it went closed-source. A Leaflet based snippet is coming soon.
-For mobile apps, you can do the same with MapLibre Native.
-You can also download our processed planet MBTiles and BTRFS images if you want to self-host yourself. Details are in the GitHub at hyperknot/openfreemap.
-...
-The main repo is hyperknot/openfreemap
-Styles are at hyperknot/openfreemap-styles
-twitter: @hyperknot
-twitter: @OpenFreeMapOrg
-mastodon zsolt https://elk.zone/sigmoid.social/@hyperknot/followers
-mastodon ofm TODO
-Yes.
-Because I waited for years for someone to offer this service, but realised no one is going to make it. So, I thought I might use my map hosting experience and do it.
-I'll share more about the why in a blog post in the future, feel free to subscribe on the links above.
-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 buying Hetzner servers until they cover the bandwidth. I believe it can work if enough people contribute. If this project helps you save your map hosting costs, please consider our support plans!
-The map schema is OpenMapTiles.
-The tiles are generated by Planetiler.
-There is no tile server running, only BTRFS partition images with 300 million hard linked files.
-The server is nginx on Ubuntu.
-There is no cloud, just dedicated servers on Hetzner.
-Currently using Cloudflare, but it's designed so that it can be changed any time.
-Moreover, a lot of work is going into customising the styles at openfreemap-styles.
-I would have loved to use PMTiles, they are a brilliant idea!
-Unfortunately, making range requests in 80 GB files is just not working in production. They are fine for < 500 MB files, but have terrible latency and caching issues for full planet datasets.
-If you are using MapLibre, attributions are automatically added.
-If you are using this in a printed media or video, please attribute:
-OpenFreeMap © OpenMapTiles Data from OpenStreetMap
-You don't need to display the OpenFreeMap part, but it's nice if you do.
-The license of this project is MIT.
-Map data is from OpenStreetMap.
-OpenMapTiles code is released under the BSD 3-Clause License, design under CC BY 4.0. LICENSE.md.
-Fork from openmaptiles/osm-bright-gl-style. The OSM Bright GL Style is derived from Mapbox Open Styles. The OSM Bright GL Style’s code is released under the BSD 3-Clause License. The OSM Bright GL Style’s design is released under CC BY 4.0. LICENSE.md.
-Fork from maputnik/osm-liberty. OSM Liberty is a fork of OSM Bright. The OSM Bright GL Style is derived from Mapbox Open Styles. The OSM Bright GL Style’s code is released under the BSD 3-Clause License. The OSM Bright GL Style’s design is released under CC BY 4.0. LICENSE.md.
-Fork from openmaptiles/positron-gl-style. The Positron GL Style is derived from CartoDB Basemaps designed by Stamen and Paul Norman for CartoDB Inc., licensed under CC BY 3.0. The Positron GL style’s code is released under the BSD 3-Clause License. The Positron GL Style’s design is released under CC BY 4.0. LICENSE.md.
-Noto Sans is released under the SIL Open Font License, Version 1.1
-The Maki POI icon set is licensed under CC0 1.0 Universal.
-The right arrow was derived from Wikipedia, it is public domain.
-Natural Earth map data is in the public domain.
-spritezero-cli is from mapbox/spritezero-cli, licensed ISC.
- - + + + + - - diff --git a/website/map.html b/website/map.html deleted file mode 100644 index d9fbf04..0000000 --- a/website/map.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - diff --git a/website/map.js b/website/map.js new file mode 100644 index 0000000..880a7a9 --- /dev/null +++ b/website/map.js @@ -0,0 +1,19 @@ +const map = new maplibregl.Map({ + style: 'https://tiles.openfreemap.org/styles/liberty', + center: [-0.114, 51.506], + zoom: 14.2, + bearing: 55.2, + pitch: 60, + container: 'map', + boxZoom: false, + doubleClickZoom: false, + scrollZoom: false, +}) + +let nav = new maplibregl.NavigationControl({ showCompass: false }) +map.addControl(nav, 'top-right') + +let scale = new maplibregl.ScaleControl() +map.addControl(scale) + +new maplibregl.Marker().setLngLat([-0.122, 51.503]).addTo(map) diff --git a/website/style_selector.html b/website/style_selector.html new file mode 100644 index 0000000..0e9a6b2 --- /dev/null +++ b/website/style_selector.html @@ -0,0 +1,5 @@ +Choose style: + + + + diff --git a/website/template.html b/website/template.html index 578f427..32e37a3 100644 --- a/website/template.html +++ b/website/template.html @@ -1,29 +1,42 @@ + + + +
-{text}
-
+
+
+ {text}
+
+
+
+
+
+
+
-
-
diff --git a/website/text.md b/website/text.md
index d9d9345..98fc60e 100644
--- a/website/text.md
+++ b/website/text.md
@@ -12,7 +12,7 @@ It's truly open source: everything, including the full production setup is on Gi
OpenStreetMap is one of the most important collective projects in history. More than 2 million users have contributed to it over 19 years; 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 get too popular, otherwise you might end up with a $10,000 bill in a single day, like Hoodmaps did [*](https://twitter.com/levelsio/status/1730659933232730443).
+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 get too popular, otherwise you might end up with a $10,000 bill in a single day, like 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.
@@ -22,6 +22,10 @@ I'm Zsolt Ero ([twitter](https://twitter.com/hyperknot), [blog](https://blog.hyp
## How can I use it?
+
+
+
+
Include [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) in ``
```
@@ -35,20 +39,17 @@ Include [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) in ``
And initialize it to a div, like this:
```
-
-
+
```
-{map}
-
If you've used Mapbox GL before, please migrate to MapLibre. It is based on the last open-source version of Mapbox GL, before it went closed-source. A Leaflet based snippet is coming soon.
For mobile apps, you can do the same with [MapLibre Native.](https://maplibre.org/)
@@ -59,8 +60,6 @@ You can also download our processed planet MBTiles and BTRFS images if you want
...
-
-
## How can I follow this project?
The main repo is [hyperknot/openfreemap](https://github.com/hyperknot/openfreemap)
@@ -75,38 +74,31 @@ mastodon zsolt https://elk.zone/sigmoid.social/@hyperknot/followers
mastodon ofm TODO
-
## Is commercial usage allowed?
Yes.
-
-
-## Why did I make this?
+## Why did I make this?
Because I waited for years for someone to offer this service, but realised no one is going to make it. So, I thought I might use my map hosting experience and do it.
I'll share more about the why in a blog post in the future, feel free to subscribe on the links above.
-
-
## 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.
+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 buying Hetzner servers until they cover the bandwidth. I believe it can work if enough people contribute. If this project helps you save your map hosting costs, please consider our support plans!
-
-
## 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.
+There is no tile server running, only BTRFS partition images with 300 million hard linked files.
The server is nginx on Ubuntu.
@@ -116,8 +108,6 @@ Currently using Cloudflare, but it's designed so that it can be changed any time
Moreover, a lot of work is going into customising the styles at [openfreemap-styles](https://github.com/hyperknot/openfreemap-styles).
-
-
## What about PMTiles?
I would have loved to use PMTiles, they are a brilliant idea!