npm.io
0.1.1 • Published 6 years ago

olhoneycomb

Licence
MIT
Version
0.1.1
Deps
1
Size
14 kB
Vulns
0
Weekly
0
Stars
1

OlHoneycomb

Openlayers honeycomb layer source extension.

Live Demo

Effect

effect

Usage

Like using cluster:

install

npm i olhoneycomb

 

import and using

import Honeycomb from "olhoneycomb"

const source = new VectorSource({ features: features });

let honeycombSource = new Honeycomb({
  radius: 40,
  source: source,
});

let honeycombLayer = new VectorLayer({
  source: honeycombSource,
  style: function(fe) {        
    var size = fe.get('features').length;
    //Perform style calculation
    
    //rerurn style
});

For example, see demo/src/index.js

Implementation principle

See my post: https://www.zxyao.net/Essays/Details/ZhengLiuBianXingKongJianJuLei

Keywords