<div class="gmail_quote">2012/9/18 Phil Scadden <span dir="ltr"><<a href="mailto:p.scadden@gns.cri.nz" target="_blank">p.scadden@gns.cri.nz</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
><br>
> At the moment there are 20 kml files but they're growing in number so<br>
> I would prefer to have a single vector with the filenames in it and<br>
> then cycle in order to add the layers to my map.<br>
> Can I achieve this task? or should I write the relevant stuff for each<br>
> kml file? Can I use an array prototype?<br>
<br>
</div>I use a json file which contains all the details about the layers I want<br>
to add to a map and how they will behave. I have then coded an object<br>
that reads the json and creates the maps from that. It gives me a<br>
generic mapping application that I can use in many contexts.<br>
(<a href="http://data.gns.cri.nz/dataportal" target="_blank">data.gns.cri.nz/dataportal</a> - free registration required but there are 4<br>
maps inside that application using this method).<br>
<br>
I would worry about a lot of KML files. They are slow to transmit and<br>
load. geoserver + postgis and sql views would allow you to do a WMS for<br>
display, WFS for query which would be a lot more efficient as your data<br>
size increases.<br></blockquote><div><br>I solved with a for loop but yes, kml files are too slow... <br>I run a WMS server (mapserver + postgis) and think I'll finally switch to it.<br></div></div><br>Regards<br>-r<br>
<br clear="all"><br>-- <br><i><span></span><span>L'unica speranza di catarsi, ammesso che ne esista una,
resta affidata all'istinto di ribellione, alla rivolta non isterilita
in progetti, alla protesta violenta e viscerale. (V. Evangelisti)<br></span></i><br>