Wrld.js Documentation for 3D Maps Anywhere

<script src="https://cdn-webgl.wrld3d.com/wrldjs/dist/latest/wrld.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.1/leaflet.css" rel="stylesheet" />
<div id="map" style="height: 250px"></div>
<script>L.Wrld.map("map", "your_api_key_here");</script>

Getting started

  1. To use wrld.js, you will need to sign up for a free account.
  2. Once you get a free account, you will be able to create an API Key.
  3. Just replace your_api_key_here with your API key, and paste this code above into the body of your HTML.

Installing via NPM

The wrld.js API is also available on npm. You can install it via: npm install wrld.js

API documentation

The wrld.js API is based on Leaflet.js, providing a familiar API for embedding 3D maps in a web page.

To allow them to work in 3D space, wrld.js extends a few of the Leaflet types. For example, the L.Wrld.map function creates an interactive 3D map on the page.

The standard Leaflet factory functions can be used as normal, e.g. L.marker and L.polygon etc. Please refer to the “Vector Layers” section.


See more examples ➜


If you have any questions, bug reports, or feature requests, feel free to submit to the wrld.js issue tracker on GitHub.