Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

leaflet marker cluster change color

.marker-cluster-small {
background-color: rgba(218, 94, 94, 0.6);
}
.marker-cluster-small div {
background-color: rgba(226, 36, 36, 0.6);
}
.marker-cluster-medium {
background-color: rgba(241, 211, 87, 0.6);
}
.marker-cluster-medium div {
background-color: rgba(240, 194, 12, 0.6);
}

.marker-cluster-large {
background-color: rgba(253, 156, 115, 0.6);
}
.marker-cluster-large div {
background-color: rgba(241, 128, 23, 0.6);
}
Comment

leaflet marker cluster change color

iconCreateFunction: function (cluster) {
 var childCount = cluster.getChildCount();
 var c = ' marker-cluster-';
 if (childCount < 10) {
   c += 'small';
 } 
 else if (childCount < 100) {
   c += 'medium';
 } 
 else {
   c += 'large';
 }

 return new L.DivIcon({ html: '<div><span>' + childCount + '</span></div>', 
  className: 'marker-cluster' + c, iconSize: new L.Point(40, 40) });
 }
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript templates 
Javascript :: Array of indexOf 
Javascript :: css in js material ui 
Javascript :: push and unshift in javascript 
Javascript :: Javascript first example 
Javascript :: javascript symbol 
Javascript :: hamburger menu js 
Javascript :: multiselect checkbox 
Javascript :: get last item in array js 
Javascript :: emacs 
Javascript :: html form action javascript method 
Javascript :: Query MongoDB - Node.js 
Javascript :: object model javascript 
Javascript :: objects in javascript 
Javascript :: js compiler 
Javascript :: Uncaught ReferenceError: function is not defined 
Javascript :: add property with value in js 
Javascript :: screenshot 
Javascript :: last element from list javascript 
Javascript :: express middleware status code always 200 
Javascript :: untrusted health sourcesa 
Javascript :: aria labelledby js 
Javascript :: js match emoticon 
Javascript :: where to add const form = document.querySelector(".top-banner form"); form.addEventListener("submit", e = { e.preventDefault(); const inputVal = input.value; }); 
Javascript :: Create an Alchemy Key javascript 
Javascript :: nestjs test db 
Javascript :: what does tilde (~) and caret (^) mens in package.json file 
Javascript :: how to make your discord bot respond to specific users 
Javascript :: feathersjs quicstart 
Javascript :: react interactions 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =