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.
PolarMap.js is currently only compatible with Leaflet 0.7.7. PolarMap.js has not been updated nor tested with Leaflet 1.0 or newer.
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.
PolarMap.js requires certain other libraries to work properly.
Once the requirements are included, you can include the
polarmap.js files in your HTML.
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.
Get started with PolarMap.js in a few lines of code.
Easily switch the map projection to the user's longitude, providing them a map for their locale.
Integrate with OSM Nominatim search for finding locations.
Add your own markers, polygons, or layers to PolarMap.
Want to turn off saving the map view in the URL? No problem.
Use a PolarMap in place of a Leaflet map in your own code.
Integrate the Leaflet Marker Cluster plugin with the PolarMap plugin.
Change the active map projection through code using the PolarMap plugin API.
Use OSM Nominatim with the Leaflet PolarMap plugin.
Load shapefiles and draw them with PolarMap.js.
Store the current map projection, location, and zoom level in the URL for bookmarking purposes.
Use Leaflet's layer switching control to change the map projection.
Detect the user's longitude using HTML5 locate API and adjust the map projection to the closest longitude.
Draw vector circles, polylines, and polygons on Leaflet PolarMap.js plugin.
Integrate with the Leaflet Style Editor plugin to let the user customize the map in the browser.
Use AJAX to load EPSG definitions dynamically before drawing a projected map.
The code for PolarMap.js is open source and licensed under the BSD 2-Clause License.