Deploying your own Slippy Map

From OpenStreetMap Wiki
Jump to navigation Jump to search

Deploying your own Slippy Map is a common way of Using OpenStreetMap. It usually means integrating a slippy map which shows map tiles into your web page by using some JavaScript code.

JavaScript libraries

You can embed our existing map into your website, just as you might with Google or Yahoo! maps. This can be done using one of the following JavaScript map libraries:

Name License Raster tiles Vector tiles
Leaflet (wiki) BSD 2-Clause yes no[1]
Google Maps JS API (wiki) Proprietary yes via plugin
OpenLayers (wiki) BSD 2-Clause yes yes
Mapbox GL JS (wiki) Proprietary yes yes
MapLibre GL JS (wiki) BSD yes yes
Tangram MIT no yes

www.openstreetmap.org is using Leaflet.

  1. There are various plugins but none of them claim to work with the latest Leaflet version.

Embedding OSM in a CMS/framework

You can embed OSM in your favourite content management system (CMS):

CMS/framework Module/plugin Note Sources Tutorial Example
with OSM map embedded
Joomla OSModul Module based on Leaflet and supports markers [1]
Mediawiki MultiMaps Uses Leaflet or Google Maps API (configurable) Wikimedia Gerrit This wiki! In the tutorial
MediaWiki Kartographer Powered by Leaflet MediaWiki wiki Wikivoyage
MediaWiki Maps Powered by Leaflet Manual
Tiki Wiki CMS Groupware built-in Via OpenLayers
WordPress OSM WordPress Plugin Also adds gpx and kml files Download Simple sample

Sources of tiles


OpenStreetMap tile servers

Typically these examples show you how to use the OpenStreetMap tile servers run by the OpenStreetMap Foundation itself. Your site serves up the HTML and the JavaScript (maybe) but the tile images of the map are still fetched by the browser from our servers. You must do this in accordance with the tile usage policy. This service run by donations is not designed and suited for heavily used applications. Please consider using a commercial tile provider instead.

Alternative tile servers

Alternative tile providers (with their own usage policies) are available. Many of them apply different colours and styles of map details.

See Raster tile providers for a list of some tile providers.

Your own map tiles

For ultimate flexibility, OpenStreetMap also gives you the unique ability to generate your own map tiles — styled any way you like — from our data. See Switch2Osm.org for more information on serving your own tiles.

See also