I've got problem, I'm creating map based application, and now I have to add to map about 100 000 graphic points, from coordinates. I was trying in many ways to do it, but always process of adding points takes about 7-10 secounds, or my web browser just hang on. is it even possible to add this amount of data to map without having problems with performance?thanks for any advices!:)
now I'm testing many options to add points. I get points coordinates from an array, then to avoid hang up a web browser I'm spliting data for parts (1 part = 1000 points) and then tryin to add via API function. My code looks like:points is an array with coordinates in format [[x1,y1],[x2,y2].....[x100000,y100000]];
it works just fine, up until 4600 points - any more, and the map simply doesn't draw. Any ideas as to why that might be?
var layerSelectedBoreholes = new esri.layers.GraphicsLayer({displayOnPan: false}); var length = points.length; var tmparray = []; var i = 0; while (i < length){ tmparray.push(points); i++; if (i % 1000 == 0){ pointsPart = getMultiPointFeature(tmparray); var gra = new esri.Graphic(pointsPart); layerSelectedBoreholes.add(gra); console.log(i); tmparray = []; } } function getMultiPointFeature(points){ var multiPoint = {"geometry":{"points":points,"spatialReference":2180}, "symbol":{ "style":"STYLE_CIRCLE", "size":3, "color":[0,0,0,255], "type":"esriSMS", "outline":{ "style":"STYLE_SOLID", "color":[0,0,0,255], "width":0, "type":"esriSLS" } } }; return multiPoint; }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.