Arctic Web Map

PolarMap.js

Arctic Web Map provides a JavaScript client library to integrate our tiles system with your own web map requirements.

With PolarMap.js, you have access to a Leaflet-based API for adding your own Arctic Web Map to your site or application. For basic use cases, a simple API is available. If you need more advanced integration, then the lower-level Leaflet.PolarMap plugin can be used to more tightly integrate custom components or third-party Leaflet plugins.

Download

A zip file containing the latest version of PolarMap.js can be downloaded from GitHub under the "Tags" tab.

The source code is online at GitHub. The repository contains instructions on building your own copy from source.

PolarMap.js can be used from Node.js by installing the polarmap module from npmjs. You can then require polarmap to include the PolarMap initialization function.

Bower compatibility is also available. Once installed with Bower you can include the PolarMap JS and CSS in your web app.

Requirements

PolarMap.js requires certain other libraries to work properly.

Once the requirements are included, you can include the polarmap.css and polarmap.js files in your HTML.

PolarMap.js API

PolarMap.js contains two parts: the lower-level Leaflet.PolarMap plugin and the basic PolarMap library. If you are new to PolarMap and Leaflet, take a look at the Basic PolarMap library API first.

Full documentation detailing usage and code examples is available on GitHub.

Examples for PolarMap.js Library

PolarMap Quick Start

Get started with PolarMap.js in a few lines of code.

PolarMap with Location Detection

Easily switch the map projection to the user's longitude, providing them a map for their locale.

PolarMap with Geo Search

Integrate with OSM Nominatim search for finding locations.

PolarMap with Custom Layers

Add your own markers, polygons, or layers to PolarMap.

PolarMap without Automatic Permalinks

Want to turn off saving the map view in the URL? No problem.

Examples for PolarMap Leaflet Plugin

Basic Plugin Usage

Use a PolarMap in place of a Leaflet map in your own code.

Marker Clustering

Integrate the Leaflet Marker Cluster plugin with the PolarMap plugin.

Polar Projections

Change the active map projection through code using the PolarMap plugin API.

Geo Search

Use OSM Nominatim with the Leaflet PolarMap plugin.

Shapefiles

Load shapefiles and draw them with PolarMap.js.

Location Hash

Store the current map projection, location, and zoom level in the URL for bookmarking purposes.

Layers Switcher

Use Leaflet's layer switching control to change the map projection.

Projection Detection

Detect the user's longitude using HTML5 locate API and adjust the map projection to the closest longitude.

Vector Layers

Draw vector circles, polylines, and polygons on Leaflet PolarMap.js plugin.

Style Editor

Integrate with the Leaflet Style Editor plugin to let the user customize the map in the browser.

Remote EPSG Definitions

Use AJAX to load EPSG definitions dynamically before drawing a projected map.

License

The code for PolarMap.js is open source and licensed under the BSD 2-Clause License.

Contributing

If you have a bug fix or enhancement, please fork the PolarMap.js Git repository and submit a Pull Request on GitHub.