npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@terrestris/mapfish-print-manager

v12.0.0

Published

An interface to easily communicate with the MapFish Print module

Downloads

791

Readme

Build Status

Mapfish Print Manager

An interface manager to easily communicate with the MapFish Print servlet via an OpenLayers based webapplication.

Installation

If you're using OpenLayers in version 7 just run:

npm i --save @terrestris/mapfish-print-manager

For version 6 one might use the manager in version 6:

npm i --save @terrestris/mapfish-print-manager@6

For version 4 one might use the manager in version 1:

npm i --save @terrestris/mapfish-print-manager@1

Usage

// Import the manager. If you're using MapFish in version 2, you might want to
// import the `MapFishPrintV2Manager` instead.
import { MapFishPrintV3Manager } from '@terrestris/mapfish-print-manager';

// Construct the manager with a remote print servlet and an `ol.Map` instance
// (required).
const printManager = new MapFishPrintV3Manager({
  url: 'https://10.10.10.10/print/',
  map: olMap
});

// Initialize the manager. It will return a resolved `Promise` as soon as the
// capabilities are loaded from the given ressource, e.g. https://10.10.10.10/print/info.json.
printManager.init()
  .then(() => {
    // Prepare the print layout via the extent feature on the map and/or the
    // usage of the setters like `printManager.setLayout()` and call
    // `printManager.print()` to create the print document.
  });

Examples

Do you want to see the Mapfish Print Manager in action? There are two examples showing how it works.

Start a locale instance for both MapFish Print version 2 and 3 by executing:

cd docker
docker-compose -f docker-compose.yml up --build

The print servlets are available under http://localhost:18083 (v2) and http://localhost:18082/print (v3) now.

Install all needed dependencies and start the development server with

npm i
npm start

You can now try out the example applications:

  • http://localhost:9000/print-manager-v2-example.html (v2)
  • http://localhost:9000/print-manager-v3-example.html (v3)