Question: I have a similar problem to [this post](https://stackoverflow.com/questions/174535/google-maps-overlays). I need to display up to 1000 polygons on an embedded Google map. The polygons are in a SQL database, and I can render each one as a single KML file on the fly using a custom HttpHandler (in ASP.NET), like this <http://alpha.foresttransparency.org/concession.1.kml> . 

Even on my (very fast) development machine, it takes a while to load up even a couple dozen shapes. So two questions, really:

1. What would be a good strategy for rendering these as markers instead of overlays once I'm beyond a certain zoom level?
2. Is there a publicly available algorithm for simplifying a polygon (reducing the number of points) so that I'm not showing more points than make sense at a certain zoom level?

Answer: 
For your second question: you need the [Douglas-Peucker Generalization Algorithm](http://everything2.com/index.pl?node_id=859282)
I needed a solution to your #2 question a little bit ago and after looking at a few of the available line-simplification algorithms, I created my own.

The process is simple and it seems to work well, though it can be a bit slow if you don't implement it correctly:

**`P[0..n]`** is your array of points
 Let **`T[n]`** be defined as the triangle formed by points **`P[n-1], P[n], P[n+1]`**
**`Max`** is the number of points you are trying to reduce this line to. 

1. Calculate the area of every possible triangle `T[1..n-1]` in the set.
2. Choose the triangle `T[i]` with the smallest area
3. Remove the point `P[i]` to essentially flatten the triangle
4. Recalculate the area of the affected triangles `T[n-1], T[n+1]`
5. Go To Step #2 if the number of points > `Max`