dojo.declare('esri.ux.layers.ClusterLayer', esri.layers.GraphicsLayer, {
Scripts, which you posted is very good, but thay haven't "flare effect". I need this functionality together with the script above. I'm novice in JavaScript and I can't do it. Can you give me some advice or can you implement this functionality? I think that for someone who knows how it will be easy.
Thank you. That provided me with enough info to get esri.ux.layers.ClusterLayer-debug.js working with the latest JS API.I'm just tracking down one last issue with mouse over infoWindows
I created an updated version of the ClusterLayer that works with services, similar to a FeatureLayer, but with same added sugar.
You can read more about it here.
Esri ClusterFeatureLayer - odoenet
Here is a GeoNet blog post here
Let's talk clusters.
The source code can be found here
odoe/esri-clusterfeaturelayer · GitHub
I was working on this today too. Looks like you got a lot further than this beginner (me) did.I tried your solution and updated the index.html with
<script src="//js.arcgis.com/3.12/"></script>
and receive a mulitpleDefine error. any ideas?
Got it to work to a degree:
used the following for esri.ux.layers.ClusterLayer-debug.js file.
define([
"dojo/_base/declare",
"esri/layers/GraphicsLayer",
"dojox/lang/functional",
"dojox/lang/functional/lambda",
"dojox/lang/functional/curry",
"dojox/lang/functional/fold"
], function (
declare, GraphicsLayer
) {
return declare([GraphicsLayer], {
constructor: function (options) {
... //rest of it like the esri.ux.layers.ClusterLayer-debug.js file
// sorry may not be allowed to post the rest of it due to company privacy
// please see below comments
});
Also at every "new esri.geometry.Point(...)" statement has to be converted to new esri.geometry.Point(..., this._map.spatialReference) where the spatial reference has to be specified, else it will default to 4326.
Also lot of the references to map was bombing out as null. I just replaced them with this._map which is being set in the constructor.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.