{"action":"created","issue":{"url":"https://api.github.com/repos/meggsimum/cpsi-mapview/issues/58","repository_url":"https://api.github.com/repos/meggsimum/cpsi-mapview","labels_url":"https://api.github.com/repos/meggsimum/cpsi-mapview/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/meggsimum/cpsi-mapview/issues/58/comments","events_url":"https://api.github.com/repos/meggsimum/cpsi-mapview/issues/58/events","html_url":"https://github.com/meggsimum/cpsi-mapview/issues/58","id":382672010,"node_id":"MDU6SXNzdWUzODI2NzIwMTA=","number":58,"title":"Build the Layer Tree Manually","user":{"login":"geographika","id":490840,"node_id":"MDQ6VXNlcjQ5MDg0MA==","avatar_url":"https://avatars3.githubusercontent.com/u/490840?v=4","gravatar_id":"","url":"https://api.github.com/users/geographika","html_url":"https://github.com/geographika","followers_url":"https://api.github.com/users/geographika/followers","following_url":"https://api.github.com/users/geographika/following{/other_user}","gists_url":"https://api.github.com/users/geographika/gists{/gist_id}","starred_url":"https://api.github.com/users/geographika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geographika/subscriptions","organizations_url":"https://api.github.com/users/geographika/orgs","repos_url":"https://api.github.com/users/geographika/repos","events_url":"https://api.github.com/users/geographika/events{/privacy}","received_events_url":"https://api.github.com/users/geographika/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-20T13:50:20Z","updated_at":"2018-11-22T11:11:25Z","closed_at":null,"author_association":"COLLABORATOR","body":"Currently all layers are displayed in the layer tree. Ideally it would be possible to construct the layer tree manually, specifying layer order and folders / sub-folders as required. \r\n\r\nIn the original MapView GeoExt layer loaders were originally used to load different categories of layers. In the end the application required fine tuning so the tree was created in code using syntax such as:\r\n\r\n```\r\n{\r\n    text: \"Road Layers\",\r\n    expanded: true,\r\n    children: [\r\n        this.createParameterLayer(\"RoadSchedule\"),\r\n        this.getSingleLayerConfig(\"RoadScheduleJunctions\"),\r\n        this.getSingleLayerConfig(\"RoadClasses\"),\r\n        this.getSingleLayerConfig(\"TIIRoadNetwork\")\r\n    ]\r\n},\r\n```\r\n\r\nLayers were \"found\" using their WFS/WMS server name rather than text as the latter was more likely to change. \r\n\r\nIn the initial prototype it would be useful to have a \"Base Layers\" folder and a \"Layers\" folder. \r\n"},"comment":{"url":"https://api.github.com/repos/meggsimum/cpsi-mapview/issues/comments/440996932","html_url":"https://github.com/meggsimum/cpsi-mapview/issues/58#issuecomment-440996932","issue_url":"https://api.github.com/repos/meggsimum/cpsi-mapview/issues/58","id":440996932,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDk5NjkzMg==","user":{"login":"geographika","id":490840,"node_id":"MDQ6VXNlcjQ5MDg0MA==","avatar_url":"https://avatars3.githubusercontent.com/u/490840?v=4","gravatar_id":"","url":"https://api.github.com/users/geographika","html_url":"https://github.com/geographika","followers_url":"https://api.github.com/users/geographika/followers","following_url":"https://api.github.com/users/geographika/following{/other_user}","gists_url":"https://api.github.com/users/geographika/gists{/gist_id}","starred_url":"https://api.github.com/users/geographika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geographika/subscriptions","organizations_url":"https://api.github.com/users/geographika/orgs","repos_url":"https://api.github.com/users/geographika/repos","events_url":"https://api.github.com/users/geographika/events{/privacy}","received_events_url":"https://api.github.com/users/geographika/received_events","type":"User","site_admin":false},"created_at":"2018-11-22T11:11:25Z","updated_at":"2018-11-22T11:11:25Z","author_association":"COLLABORATOR","body":"As discussed earlier - something along the following would be good to implement:\r\n\r\n- 2 folders in the prototype, one with base layers, and one with other the overlays\r\n- ability to apply properties from the default.json config file to the relevant NodeInterface (qtip / iconCls)\r\n\r\nThe approach would likely be coded - creating nodes and children programatically similar to the ExtJS example below. Trying to dynamically create an entire tree directly from the config file would likely be too complex and still prone to missing future custom requirements. \r\n\r\n```\r\nvar store = Ext.create('Ext.data.TreeStore', {\r\n    root: {\r\n        expanded: true,\r\n        children: [\r\n            { text: 'detention', leaf: true },\r\n            { text: 'homework', expanded: true, children: [\r\n                { text: 'book report', leaf: true },\r\n                { text: 'algebra', leaf: true}\r\n            ] },\r\n            { text: 'buy lottery tickets', leaf: true }\r\n        ]\r\n    }\r\n});\r\n\r\n```"}}
{"actor":{"display_login":"geographika"}}