[Users] MVC Simple + treelayer
Antonio Parrotta
antonioparrotta at gmail.com
Wed Dec 5 16:05:21 CET 2012
Hello Aleandre,
I skipped for the moment MVC approach, as soon as I get more experience
with extjs then will try again. So, yes, I solved it, thank you
Antonio
- Antonio
On 5 December 2012 15:59, Alexandre Dubé <adube at mapgears.com> wrote:
> Hi Antonio,
>
> Sorry for the late answer. Were you able to solve your issue ?
>
> Alexandre
>
>
>
> On 12-11-19 07:58 PM, Antonio Parrotta wrote:
>
> Hi,
>
> I'm trying to merge MVC simple (*
> http://geoext.github.com/geoext2/examples/app/simple/simple.html*) and
> tree (*http://geoext.github.com/geoext2/examples/tree/tree.html*)
> examples . I created a new east panel in the viewport and a Layer.js store
> as reported below. The problem here is that at the time *CF.store.Layers* is
> defined, map controller is not yet initialized, then *mapPanel.layers*:is
> undefined. Do you know how to postpone the store creation after the map
> initialization?
>
> thanks a lot
> Antonio
>
> *Layer Store*
>
> *Ext.define('CF.store.Layers', {*
> * extend: 'Ext.data.TreeStore',*
> * model: 'GeoExt.data.LayerTreeModel',*
> * root: {*
> * expanded: true,*
> * children: [*
> * {*
> * plugins: [{*
> * ptype: 'gx_layercontainer',*
> * store: mapPanel.layers *
> * }],*
> * expanded: true*
> * }, {*
> * plugins: ['gx_baselayercontainer'],*
> * expanded: true,*
> * text: "Base Maps"*
> * }, {*
> * plugins: ['gx_overlaylayercontainer'],*
> * expanded: true*
> * }*
> * ]*
> * } *
> *});*
>
>
> *East Panel*
>
> *items: [*
> * Ext.create('GeoExt.tree.Panel', {*
> * region: "east",*
> * border: true,*
> * title: "Layers",*
> * width: 200,*
> * split: true,*
> * collapsible: true,*
> * collapseMode: "mini",*
> * autoScroll: true,*
> * store: 'Layers',*
> * root: {*
> * text: 'root node'*
> * }, *
> * rootVisible: false,*
> * lines: false,*
> * tbar: [{*
> * text: "remove",*
> * handler: function() {*
> * layer = mapPanel.map.layers[2];*
> * mapPanel.map.removeLayer(layer);*
> * }*
> * }, {*
> * text: "add",*
> * handler: function() {*
> * mapPanel.map.addLayer(layer);*
> * }*
> * }]*
> * })*
> *]*
> - Antonio
>
>
> _______________________________________________
> Users mailing listUsers at geoext.orghttp://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>
>
> --
> Alexandre Dubé
> Mapgearswww.mapgears.com
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20121205/bf7e5109/attachment.htm
More information about the Users
mailing list