Comments (2)
Hello.
Yes a weight example is missing. But it should no be very different than categories. By default, each marker has "1" as weight but you can change the value with marker.weight = newvalue
Reusing the random.10000-categories example, it's something like this :
for (var i = 0; i < size; ++i) {
var marker = new PruneCluster.Marker(59.91111 + (Math.random() - 0.5) * Math.random() * 0.00001 * size, 10.752778 + (Math.random() - 0.5) * Math.random() * 0.00002 * size);
marker.category = Math.floor(Math.random() * Math.random() * colors.length);
// Set a random weight between 1 and 3
marker.weight = Math.ceil(Math.random() * 3);
markers.push(marker);
leafletView.RegisterMarker(marker);
}
I would like to provide better examples including this feature, but I am not sure if this feature is very useful.
from prunecluster.
Merci pour votre réponse rapide. La fonctionnalité de pondération est très utile pour les data que je souhaite publier : ici une base de 1.2M de points représentative du commerce de proximité en France agrégée par segment de rue. Chaque point étant noté/pondéré en fonction du nombre et de la surface des commerces présents dans chaque segment. En fait, je souhaite afficher des clusters pondérés sur les long/lat et afficher la somme des pondérations sur chaque marker.
J’ai vu par défaut la pondération égale 1.
J’ai testé sur votre exemple (random.10000-categories example) qui prends bien en considération les poids sur les X et Y mais cela n’a pas d’effet sur l’affichage des comptages de chaque marker. Il faudrait afficher la variable totalWeight à la place de la variable population mais cela à des impacts sur l’icône d’affichage en particulier lorsque l’on ajoute une analyse par catégorie. Il y a donc un peu de tunning à faire sur le code pour une fonctionnalité de pondération complètement satisfaisante.
Votre travail est fantastique !
In English :
Thank you for your quick response. The weighting feature is very useful for the data that I want to publish: 1.2M points of the retail shops in France aggregated by street segment. Each point/street segment weighted according to the number and the importance of business present in each segment. In fact, I want to display the weighted long / lat and the sum of the weights on each marker clusters.
I saw the default weighting equal to 1.
I have tested with your random.10000-categories example. That is OK for the weighted calculation of the long/lat but this has no effect on the display of the counting on each marker. It should display the variable “totalWeight” instead of the variable “population”. But this has some impacts on the icon display especially when combining with an analysis by category. So there could be a bit of tuning on the code for a completely satisfactory weighting feature.
This work is fantastic! I have tested another 2M non weighted point data and it is working fine.
Paul Archambault
Analytic & Data Consulting Southern Europe
MapInfo - Pitney Bowes Software
134, rue Danton 92593 Levallois-Perret Cédex
Fixe : + 33 (0)1 46 17 54 47| Fax : +33 (0)1 46 17 54 64 | Mobile : + 33 (0)6 73 99 86 33
http://www.mapinfo.com/
De : Antoine Pultier [mailto:[email protected]]
Envoyé : mardi 26 août 2014 10:17
À : SINTEF-9012/PruneCluster
Cc : Paul Archambault
Objet : Re: [PruneCluster] Weight example (#17)
Hello.
Yes a weight example is missing. But it should no be very different than categories. By default, each marker has "1" as weight but you can change the value with marker.weight = newvalue
Reusing the random.10000-categories example, it's something like this :
for (var i = 0; i < size; ++i) {
var marker = new PruneCluster.Marker(59.91111 + (Math.random() - 0.5) * Math.random() * 0.00001 * size, 10.752778 + (Math.random() - 0
.5) * Math.random() * 0.00002 * size);
marker.category = Math.floor(Math.random() * Math.random() * colors.length);
// Set a random weight between 1 and 3
marker.weight = Math.ceil(Math.random() * 3);
markers.push(marker);
leafletView.RegisterMarker(marker);
}
I would like to provide better examples including this feature, but I am not sure if this feature is very useful.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-53388908.
from prunecluster.
Related Issues (20)
- cluster onClick event
- "broken" link in readme HOT 1
- tooltips with permanent option issue HOT 1
- Possible to use X/Y point coordinates instead of LatLng? HOT 1
- Question: Cluster by distance HOT 4
- Cluster not updated for custom data fields
- Cluster not updating custom (rotationAngle & rotationOrigin) data fields in realtime HOT 1
- Cluster not updating custom (rotationAngle & rotationOrigin) data fields in realtime HOT 1
- PruneCluster webpack compability with newest exports-loader
- z-index for different clusters
- Change speed of the moving marker when .move is used? HOT 1
- Marker Clustering ServerSide HOT 2
- Svelte Import issue
- prune cluster in vue js
- Touch not working with latest Samsung browser HOT 3
- Is there any feature so we can toggle between cluster and markers? HOT 3
- Open the popup of a marker in the programm HOT 2
- showCoverageOnHover PruneCluster
- markerPop and clustering conflicting
- popups keepInView: false,
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prunecluster.