Skip to content
This repository was archived by the owner on Mar 16, 2021. It is now read-only.

chronark/atlas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,111 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Atlas

Mapping library for jobs

Documentation

API documentation

Setup

Installing

  1. Build project
git clone https://github.com/chronark/atlas.git
npm install
npm run build
  1. Embed the scripts in your HTML.
<script type="text/javascript" src="vendors~main.atlas.js"></script>
<script type="text/javascript" src="atlas.js"></script>
  1. Add a div with an id. You can choose the id but remember it for later.
<div id="map-container"></div>

Setup

From your javascript code create a new map by using the id from earlier:

const map = new Map("map-container")

Initial State

Map() accepts a config object as second parameter where you can specify an initial viewport either via latitute/longitude or an extent.

By LatLon

const mapConfig = {
  view: {
    lat: 0,
    lon: 45,
    zoom: 2,
  },
}

const map = new Map("id", mapConfig)

By Extent

const mapConfig = {
  extent: [1, 2, 3, 4],
}

const map = new Map("id", mapConfig)

If you supply both a view and extent object, it will use only the view configuration.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors