6

I am new to ArcGIS, and currently developing a small app that uses ArcGIS JavaScript API.

I have encountered a couple of problems while working on this.

I have about 5000 points that I am returning from a database, parsing them, and displaying on my map (a state in the USA). When my app finishes rendering, the entire state is full of points and you can't make anything out of it. Now, so my understanding, simplemakersymbols, when declared have pixel size, so you can't increase the size dynamically when zooming in.

Is there any alternative to this?

I tried first declaring a smaller size, and then once zoomed in to a certain scale, I redeclare all the points with a larger pixel size value. Hence all this rendering and re-rendering takes a while before all the points are displayed again.

So is there a better way to accomplish this task?

I am using ArcGIS 10.1 and create points based on data I receive from the database on the fly.

nmtoken
  • 13,355
  • 5
  • 38
  • 87
  • 2
    Sounds like the points are not in a map service but your programmatically creating points on the fly direct from the DB in a feature/graphics layer? Please also edit your Q to state version of ArcGIS Server. – jakc Dec 22 '12 at 09:36
  • @jainilshah, have you considered implementing Multipoint objects as a solution? I've never used it, so I can't explain what you need to do, but if I were in your shoes this is what I'd try first. – elrobis Dec 22 '12 at 15:33
  • Thanks for the A to my Q. Are you restrained to have to pull from the DB. I could give you a good answer if you can pull the data into a Dynamic Map Service within ArcGIS Server. – jakc Dec 29 '12 at 03:08
  • Closely related: http://gis.stackexchange.com/questions/27719/adding-large-amount-of-data-arcgis-9-x-javascript-api – whuber Dec 30 '12 at 14:31

2 Answers2

2

There are lots of ways to handle large datasets if you can create an ArcGIS Server map service from the data (auto generalization, tiling, scale dependency, dynamic service combined with feature service), but if you can only get the data on the fly and make individual graphics, you are going to have to cluster. (Google maps used to have this problem of bogging down when adding lots of individual graphics to browser -- they cluster now.)

Here is the ArcGIS JS sample that shows how to do it. A thought -- you could break out clusters by county boundary polygons in the state.

http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/layers_point_clustering.html

awesomo
  • 3,421
  • 17
  • 34
0

You need to aplly a kind of cluster to group points that are close to each other. I not a arcgis user but it should have something to do that.

If not you can try inspect the scale of map been showed and collapse points based on proximity and scale.

Now your map will have two kinds of points, cluster points and unclustered points. Cluster points click should trigger an increate scale denominator action.

cavila
  • 1,021
  • 6
  • 10