I do this. I have my layer definitions and behaviours in an external file, stored as json format. The application fetches the json, and then processes it to create the map with all the layers and desired behaviour. I have a web application for defining the layers and behaviours desired and storing to a json file. (Warning - a non-trivial amount of work). You can see a resulting map at http://data.gns.cri.nz/pbe/ (free registration required). The menu contents are also completely defined by a json file. If you look at the "interactive maps", you will see from URL, that it just loads different json files for each map. This gives me one set of code to create multiple web mapping applications. The other advantage is that each content and behaviour can have user groups associated with it. This way different classes of users (eg internal versus external versus paying clients) get to see different things from the same config. The json is filtered by user before passing it to OL.

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.

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to