[OpenLayers-Users] Kml layers "on the fly"

Raffaele Morelli raffaele.morelli at gmail.com
Tue Sep 18 21:57:59 PDT 2012


2012/9/18 Phil Scadden <p.scadden at gns.cri.nz>

>
> >
> > At the moment there are 20 kml files but they're growing in number so
> > I would prefer to have a single vector with the filenames in it and
> > then cycle in order to add the layers to my map.
> > Can I achieve this task? or should I write the relevant stuff for each
> > kml file? Can I use an array prototype?
>
> I use a json file which contains all the details about the layers I want
> to add to a map and how they will behave. I have then coded an object
> that reads the json and creates the maps from that. It gives me a
> generic mapping application that I can use in many contexts.
> (data.gns.cri.nz/dataportal - free registration required but there are 4
> maps inside that application using this method).
>
> I would worry about a lot of KML files. They are slow to transmit and
> load. geoserver + postgis and sql views would allow you to do a WMS for
> display, WFS for query which would be a lot more efficient as your data
> size increases.
>

I solved with a for loop but yes, kml files are too slow...
I run a WMS server (mapserver + postgis) and think I'll finally switch to
it.

Regards
-r


-- 
*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)
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120919/ec231070/attachment.html>


More information about the Users mailing list