3.0.0 • Published 7 months ago

@sigma/layer-leaflet v3.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

Sigma.js - Leaflet background layer

This package contains a leaflet background layer for sigma.js.

It displays a map on the graph's background and handle the camera synchronisation.

How to use

First you need to install leaflet in your application. You can check this page to see how to do it. Especially, don't forget to load leaflet.css in your application.

Then, within your application that uses sigma.js, you can use @sigma/layer-leaflet as following:

import bindLeafletLayer from "@sigma/layer-leaflet";

const graph = new Graph();
graph.addNode("nantes", { x: 0, y: 0, lat: 47.2308, lng: 1.5566, size: 10, label: "Nantes" });
graph.addNode("paris", { x: 0, y: 0, lat: 48.8567, lng: 2.351, size: 10, label: "Paris" });
graph.addEdge("nantes", "paris");

const sigma = new Sigma(graph, container);
bindLeafletLayer(sigma);

Please check the related Storybook for more advanced examples.

3.0.0

7 months ago

3.0.0-beta.9

8 months ago

3.0.0-beta.10

8 months ago

3.0.0-beta.11

7 months ago

3.0.0-beta.8

8 months ago

3.0.0-beta.7

8 months ago

3.0.0-beta.6

8 months ago

3.0.0-beta.5

9 months ago

3.0.0-beta.4

9 months ago

3.0.0-beta.3

11 months ago

3.0.0-beta.2

12 months ago

3.0.0-beta.1

12 months ago