<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.yshortcuts
        {mso-style-name:yshortcuts;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Coop,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>When you load data to the client you run into these problems. I assume you need to load these into the client to give better responsiveness at the client for things like mouseover? <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Anyway, I know its application dependent but I prefer to leave everything on the server and when you need access to the geometry/attributes in realtime you undertake a WFS GetFeature request. You should also transfer the data in compressed form &#8211; eg binary XML &#8211; to keep the download time to a minimum. This is a trade off in responsiveness but you retain all the geometry that&#8217;s in your database all the time and your WFS request can include a different SRS so all transformations are done at the server level for the requested area &#8211; Area Of Interest - only. You can also use WMS GetFeatureInfo to get the attributes only for any picked polygon. You can also use SLDs to render thematic maps on the server which takes away a lot of client code if you are doing that as well at the client with these polygons.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Maybe not what you wanted to hear but there is no free lunch in this regard.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span style='font-size:14.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Brad Spencer<o:p></o:p></span></b></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Managing Director,&nbsp; <b><i>NuMaps</i></b><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.numaps.com.au/">http://www.numaps.com.au/</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>tel: 02 9672 6856<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>mob: 0404 841 131<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> openlayers-users-bounces@lists.osgeo.org [mailto:openlayers-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Coup Coup<br><b>Sent:</b> Tuesday, 26 April 2011 5:22 AM<br><b>To:</b> openlayers-users@lists.osgeo.org<br><b>Subject:</b> [OpenLayers-Users] OpenLayers Optimizing page load time (reducing size of polygons) and preventing IDL polyong splits.<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div><p class=MsoNormal>Hello,<br>I have built a (using django postgis and openlayers) display about 200 specific <span class=yshortcuts>polygon shapes</span> consisting of clusters of counties in the US (including <span class=yshortcuts>Alaska</span>, <span class=yshortcuts>Puerto Rico</span> and <span class=yshortcuts>Hawaii</span>). I am displaying using <span class=yshortcuts>Google</span> as&nbsp; 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.<br><br>I have two issues I am looking for feedback or suggestions on:<br>1. Map load optimization:<br>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?<br><br>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 (<span class=yshortcuts>international date line</span>) 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?<br><br><br>Thanks for any knowledge you can share.<br><br>Coop<o:p></o:p></p></div></div></div></body></html>