2012/9/18 Phil Scadden <[email protected]> > > > > > 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) *
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
