JonnyAJAX


I'm working on an app that plot zip code boundaries, each zip code boundary can be potentially thousands of points. Just to plot 1 zip code can take 2-3 seconds... I can't imagine if I was plotting half a dozen how long it may take.

Does anyone know a workaround for lag time on drawing points Should I use MapCruncher and a custom zip code map to show the boundaries instead of drawing them And if so, how could I color those regions




Re: How to plot polygons without slow down?

Derek Chan


The idea is to have less pushpins which represent a bunch of them together. John wrote a great article here on clustering and I'm looking forward to his second version of this.

http://www.viavirtualearth.com/vve/Articles/Clustering.ashx





Re: How to plot polygons without slow down?

JonnyAJAX

I'm specificially refering to drawing polygons, which uses lots of points. Not plotting push pins.

With respect to zip codes, yes you could just plot 1 pushpin per zip code (in it's center) for when you are zoomed out but that still wouldn't solve the issue of slow down when you are zoomed in.






Re: How to plot polygons without slow down?

SoulSolutions

I think your best solution is to generate a tile layer (like what is generated from MapCruncher).

This will give you the best performance but the areas will not be interactive.

You can store them as images on some high performance storage like Amazon S3 or generate them on the fly.

I'm am doing something similar next month, so please let me know how you go.

My current plan is to look at what SharpMap can be configured to do.

John.






Re: How to plot polygons without slow down?

SoulSolutions

Sorry - if you want a quick fix try rendering the lines in small batches and using a

setTimeout("ProcessData()",50);

This gives the user responsiveness and your lines have this cool effect of slowing being drawn

Play with how many you draw per batch to your taste.

John