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

Phil Scadden p.scadden at gns.cri.nz
Tue Sep 18 14:40:45 PDT 2012


>
> 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.


Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.



More information about the Users mailing list