Home Manual Reference Source


Installation can be done through either npm or yarn.

// Using npm
npm install --save @mapcreator/maps4news

// Using yarn
yarn add @mapcreator/maps4news

After installation the package can be imported as follows:

var m4n = require('@mapcreator/maps4news');

// Do stuff
var auth = new m4n.ImplicitFlow(1);
var api = new m4n.Maps4News(auth);

or using ES6 import statements:

import {Maps4News, DummyFlow} from '@mapcreator/maps4news';

// Do stuff
var auth = new DummyFlow();
var api = new Maps4News(auth);