OpenFreeMap
Quick Start Guide

github x

This guide provides step-by-step instructions for integrating OpenFreeMap into your website or mobile application.

To get started, choose a style from the default styles provided below. Later, there'll be options to use custom styles as well.

(You can navigate the map, it's interactive!)

Use the following style in a MapLibre map:

https://tiles.openfreemap.org/styles/liberty

How to load MapLibre?

Include MapLibre GL JS in the <head>. If you are using npm, you can install the maplibre-gl package. Make sure to import the CSS as well.

<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" />

Initialize it to a div like this:

<div id="map" style="width: 100%; height: 500px"></div>
<script>
  const map = new maplibregl.Map({
    style: 'https://tiles.openfreemap.org/styles/liberty',
    center: [13.388, 52.517],
    zoom: 9.5,
    container: 'map',
  })
</script>

Using Mapbox?

If you are currently using Mapbox, please change your libraries to MapLibre GL JS. 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.

Using Leaflet?

A Leaflet-based snippet is coming soon.

Mobile Apps

For mobile apps, you can use the same styles with MapLibre Native.

Custom styles

You can customize the styles using the Maputnik editor. For example, you can remove labels, POIs, or change colors.

When you use a customized style, you need to host the style JSON yourself and use its URL in MapLibre.

Customize Bright

Customize Liberty

Customize Positron

Self-hosting

You can also download our processed full planet Btrfs images if you want to self-host yourself. Details can be found on GitHub.

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. Alternatively, sponsor us on GitHub Sponsors.

On Gold level and above, we offer personalised technical support by email. Otherwise, support is via GitHub 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, you can do this via GitHub Sponsors. However, please understand that the nature of this project needs recurring donations to cover the server costs.