geoext / geoext2

GeoExt 2 — JavaScript Toolkit for Rich Web Mapping Applications
http://geoext.github.io/geoext2/
Other
142 stars 106 forks source link

Using GeoEXT2 store for Layer tree #396

Closed shahidnawazkhan closed 7 years ago

shahidnawazkhan commented 7 years ago

First of all I want to highlight the background of this issue. Previously I opened the same issue but someone closed my issue that this is not the right place but as I didn't get any reply from anywhere including the users of mailing list I am opening this issue again.

I want to create a layer tree like the one given in the below example. https://iris.gov.gr/SoilServices/danger.html

The example finely works when i implement the same on my own system it doesn't work and I don't know much about the complexities of GeoEXT.

I am writing my code here below and the error that I get. Here is the code for the Store: var store = Ext.create('Ext.data.TreeStore', { model: 'GeoExt.data.LayerTreeModel', root: { text: "Root", expanded: true, children: [ { text: "Θεματικοί Χάρτες", leaf: false, expanded: true, children: [ { text: sppsq.name, layer: sppsq, leaf: true, checked: false, children: [], nodeType: "gx_overlaylayercontainer" }, { text: elecag.name, layer: elecag, leaf: true, checked: false, children: [], nodeType: "gx_overlaylayercontainer" }, ] }, { plugins: [{ ptype: 'gx_baselayercontainer', loader: {store: mapPanel.layers} // BASE "REFERENCE" LAYERS FROM arcticMapPanel }], expanded: true, text: 'Υπόβαθρα' } ] } });

Below is the code for tree: _var tree = Ext.create('GeoExt.tree.Panel', { border: true, region: "west", title: "Επίπεδα", width: 290, split: true, collapsible: true, collapseMode: "mini", autoScroll: true, store: store, rootVisible: false, lines: false, listeners: { checkchange: { fn: function (record, checked, opts) { record.data.layer.setVisibility(checked) } } } } );

Error Got: too much recursion http://cdn.sencha.com/ext/gpl/5.1.0/build/ext-all-debug.js Line 1759

chrismayer commented 7 years ago

Please do not open multiple issues on the same topic.

As stated in your first issue #395 this is not the right platform for such a question. The "issues"-section here in github is only for reporting software bugs in GeoExt itself. Furthermore I repeated to your question on the mailinglist, so no need for another issue. If we discover that this is related to a bug in GeoExt2 itself, we can re-open #395 .