ol-displaced-points
Version:
Displaced Points methodology works to visualize all features of a point layer, even if they have the same location. The map takes the points falling in a given Distance tolerance from each other (cluster) and places them around their barycenter.
139 lines • 5.07 kB
TypeScript
export default DisplacedPoints;
export type Options = {
/**
* Placement Method:
* - `ring`: Places all the features on a circle whose radius depends on the number of
* features to display.
* - `concentric-rings`: Uses a set of concentric circles to show the features.
* - `spiral`: Creates a spiral with the features farthest from the center of the group in
* each turn.
* - `grid`: Generates a regular grid with a point symbol at each intersection.
*/
placementMethod?: string | undefined;
/**
* centric point radius, used for the distance between
* the centric point and the nearest displaced points.
*/
radiusCenterPoint?: number | undefined;
/**
* displaced points radius, used for the distance
* between each displaced point.
*/
radiusDisplacedPoints?: number | undefined;
};
/**
* @typedef {Object} Options
* @property {string} [placementMethod="ring"] Placement Method:
* - `ring`: Places all the features on a circle whose radius depends on the number of
* features to display.
* - `concentric-rings`: Uses a set of concentric circles to show the features.
* - `spiral`: Creates a spiral with the features farthest from the center of the group in
* each turn.
* - `grid`: Generates a regular grid with a point symbol at each intersection.
* @property {number} [radiusCenterPoint=6] centric point radius, used for the distance between
* the centric point and the nearest displaced points.
* @property {number} [radiusDisplacedPoints=6] displaced points radius, used for the distance
* between each displaced point.
*/
/**
* @classdesc
* Displaced Points methodology works to visualize all features of a point layer, even if they
* have the same location. To do this, the map takes the points falling in a given Distance
* tolerance from each other (cluster) and places them around their barycenter.
*
* > Note: Displaced Points methodology does not alter feature geometry, meaning that points
* are not moved from their position. Changes are only visual, for rendering purpose. Each
* barycenter is themselves a cluster with an attribute features that contain the original
* features.
*/
declare class DisplacedPoints extends DelimitedCluster {
/**
* @param {Options} options DisplacedPoints options.
*/
constructor(options: Options);
/**
* @type {string}
* @private
*/
private placementMethod;
/**
* @type {number}
* @protected
*/
protected radiusCenterPoint: number;
/**
* @type {number}
* @protected
*/
protected radiusDisplacedPoints: number;
/**
* @type {Array<Feature>}
* @protected
*/
protected displacedFeatures: Array<Feature>;
/**
* @type {Array<Feature>}
* @protected
*/
protected displacedRings: Array<Feature>;
/**
* @type {Array<Feature>}
* @protected
*/
protected displacedConnectors: Array<Feature>;
/**
*
* @returns {string}
*/
getPlacementMethod(): string;
/**
*
* @param {string} placementMethod
*/
setPlacementMethod(placementMethod: string): void;
/**
*
* @returns {Array<Feature>}
*/
allFeatures(): Array<Feature>;
/**
* @returns {Array<(import("ol/Feature").default)>} All the displaced points and rings
* @protected
*/
protected displacedPoints(): Array<(import("ol/Feature").default)>;
/**
* @param {import("ol/geom/Point").default} center Cluster centroid point
* @param {Array<(import("ol/Feature").default)>} features Clustered features
* @returns {Array<(import("ol/Feature").default)>} The displaced points and rings of the group
* @protected
*/
protected pointsGroup(center: import("ol/geom/Point").default, features: Array<(import("ol/Feature").default)>): Array<(import("ol/Feature").default)>;
/**
*
* @param {number} centerCords
* @param {number} hypotenuseCenterAndPoints
* @param {number} hypotenuseCenter
* @param {Array<Feature>} features
*/
Ring(centerCords: number, hypotenuseCenterAndPoints: number, hypotenuseCenter: number, features: Array<Feature>): void;
ConcentricRings(centerCords: any, hypotenuseCenterAndPoints: any, hypotenuseCenter: any, features: any): void;
Grid(centerCords: any, hypotenuseCenterAndPoints: any, hypotenuseCenter: any, features: any): void;
Spiral(centerCords: any, hypotenuseCenterAndPoints: any, hypotenuseCenter: any, features: any): void;
addRing(coordinates: any, options: any): void;
addDisplacedPoints(feature: any, coordinates: any): void;
/**
*
* @param {number} number
* @returns {number}
*/
numberToPixelUnits(number: number): number;
/**
*
* @param {number} pixelUnits
* @returns {number}
*/
pixelUnitsToNumber(pixelUnits: number): number;
}
import DelimitedCluster from "./DelimitedCluster";
import Feature from "ol/Feature";
//# sourceMappingURL=DisplacedPoints.d.ts.map