Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
deyihu-maptalks.tileclusterlayer
Advanced tools
markers cluster by tile
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/maptalks/dist/maptalks.css"
/>
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/maptalks/dist/maptalks.min.js"
></script>
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/maptalks.tileclusterlayer@latest/dist/maptalks.tileclusterlayer.min.js"
></script>
npm i maptalks.tileclusterlayer
# or
yarn add maptalks.tileclusterlayer
function getClusterMarkerSymbol(count) {
const symbol = {
markerType: "ellipse",
markerWidth: 65,
markerHeight: 65,
markerFill: "#fff",
markerLineWidth: 0,
markerFillOpacity: 1,
markerOpacity: 1,
textSize: 15,
textName: count,
textHaloFill: "#000",
textHaloRadius: 1.2,
textFill: "#fff",
};
if (count > 5000) {
symbol.markerFill = "red";
} else if (count > 1000) {
symbol.markerFill = "yellow";
}
return symbol;
}
const tileClusterLayer = new maptalks.TileClusterLayer("tileClusterLayer", {
maxClusterZoom: 18,
//when cluster marker mouseover will show children markers
clusterDispersion: true,
// show cluster marker children max count
dispersionCount: 500,
//get cluster marker symbol
clusterMarkerSymbol: getClusterMarkerSymbol,
// cluster marker,marker events
markerEvents: {
click: function (e) {
console.log(e);
if(e.target.getProperties().isCluster){
console.log('is cluster marker');
}
},
},
});
tileClusterLayer.addTo(map);
const geojson={
type: 'FeatureCollection',
features: [
...
]
};
tileClusterLayer.setData(geojson);
//use in ESM
import * as maptalks from 'maptalks';
import {TileClusterLayer} from 'maptalks.tileclusterlayer';
const tileClusterLayer = new TileClusterLayer("tileClusterLayer",{
...
});
FAQs
marker cluster by tile
The npm package deyihu-maptalks.tileclusterlayer receives a total of 2 weekly downloads. As such, deyihu-maptalks.tileclusterlayer popularity was classified as not popular.
We found that deyihu-maptalks.tileclusterlayer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.