[OpenLayers-Users] OpenLayers Optimizing page load time (reducing
size of polygons) and preventing IDL polyong splits.
Coup Coup
tencoupons55 at yahoo.com
Mon Apr 25 15:21:53 EDT 2011
Hello,
I have built a (using django postgis and openlayers) display about 200 specific
polygon shapes consisting of clusters of counties in the US (including Alaska,
Puerto Rico and Hawaii). I am displaying using Google as base map and then
applying the polygons to features which I attach to one of 10 layers. I am
transforming the data to projection 900913 and displaying the features as
vectors.
I have two issues I am looking for feedback or suggestions on:
1. Map load optimization:
The data is almost 1MB. I have applied the simplify utility and whittled down
the number of points in each polygon (which was as high as 8,000) down to an
average of 150 per shape. (Some polygons cant be simplfied or they will lose
their entire shape). I tried to unionagg() the entire list of polygons into 1
but I lose so much definition and will also lose the ability to enhance the map
by allowing individual selection and labelling. Is there a way to get the data
set even smaller without losing shape quality?
2. One of the polygons is in Alaska, and encompasses the islands in the
Aleutians West. Upon completion of the building the map, I'm calling
map.zoomToExtent(bounds); (where bounds is the collective bounds of all of the
polygons) and because Aleutians West is so close in proximity to the IDL
(international date line) it is placing part of the polygon on either side of
the map so it is zooming way out (so you can see the whole world map) and
splitting repeating the polygon on the respective portion of the map. Is there
a way to move the IDL so it wont try to split it in this way?
Thanks for any knowledge you can share.
Coop
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110425/28e428a8/attachment.html
More information about the Users
mailing list