0.1.1 • Published 4 years ago
olhoneycomb v0.1.1
OlHoneycomb
Openlayers honeycomb layer source extension.
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