How to Point Cluster With Dynamic Data In ArcGIS API

المشرف العام

Administrator
طاقم الإدارة
ArcGIS API is using this Demo to illustrate how Point clustering works with JSON data. In my case I am generating some point graphics from MySQL Database by a jQuery AJAX request like following code: As you can see I am storing the data in project and then access to project.Longitude, project.Latitude to create the points

request.done(function( mapInfo) { for (var i = 0; i < mapInfo.length; i++) { var project = mapInfo; var point = new Point(project.Longitude, project.Latitude); var pointSymbol = new SimpleMarkerSymbol(); pointSymbol.setStyle(SimpleMarkerSymbol.STYLE_CIRCLE); pointSymbol.setSize(12); var pointInfoTemplate = new InfoTemplate(); pointInfoTemplate.setTitle("Project Details"); pointInfoTemplate.setContent('//JSON Data'); var pointGraphic = new Graphic(point, pointSymbol).setInfoTemplate(pointInfoTemplate); points.push(pointGraphic); } for (i = 0; i < points.length; ++i) { map.graphics.add(points); } });` Can you please let me know how I can bind this points with Cluster Points in ArcGIS API sample?

Thanks



أكثر...
 
أعلى