Thanks a lot for the helpful tip! Now it works. I updated my project on GitHub:
https://github.com/JakobMiksch/HelloGeoExt

Cheers,
Jakob

Am 19.06.2018 um 13:05 schrieb Christian Mayer:

Hi,

your map detection seems OK, this looks more like a problem with ExtJS itself. Try

me.store = treeStrore; instead of me.setStore(treeStore);

since you call the parent constructor afterwards.

Cheers
Chris

On 19.06.2018 13:00, Jakob Miksch wrote:
Thanks for the hints.

It would be nice to combine the examples (https://geoext.github.io/geoext3/) into a "HelloGeoExt" application. ThisĀ  would make it much easier to learn GeoExt. I would be happy if my app could be the basis for it.

I already can access the map from my OverviewMap. See this file: https://github.com/JakobMiksch/HelloGeoExt/blob/master/app/view/main/OverviewMap.js

If I try something similar with the LayerTree I receive errors like "TypeError: viewConfig is undefined". Here is the code:
https://gist.github.com/JakobMiksch/b68276dd52bee8330ff5ab71fa238475

Could you tell why this approach works for the OverviewMap but not for the LayerTree ?

Thanks and best regards,
Jakob

Am 18.06.2018 um 16:19 schrieb Christian Mayer:


On 15.06.2018 15:06, Jakob Miksch wrote:
Thanks for the link. I am actually getting started with Ext JS and GeoExt at the same time. (maybe this is a bad idea ... ). Understanding the BasiGX components is still a bit unclear to me. And the web apps I mentioned earlier are very complex and hence also hard to understand.

The examples on http://geoext.org/ are nice and easy to understand, but I find it challenging to convert the single file into the proper folder structure of Ext.

you are right, that there are not so many example apps available, which use the MVC / MVVM pattern. Most of the examples are simple single-file demo-apps (like on the GeoExt website). Maybe a simple MVC / MVVM app would be cool and we had that for previous GeoExt versions:

https://github.com/geoext/geoext2/tree/master/examples/app/simple

https://github.com/geoext/geoext2/tree/master/examples/app-mvvm



At the moment I am trying to build a pretty standard web mapping application with a main map, an overview map and a layer switcher. The overview map works, but I struggle to build the layer switcher, because I do not figure out how to access the layers from map. This is what I did so far: https://github.com/JakobMiksch/HelloGeoExt

Maybe we can use your "HelloWorld" app as example reference for MVC / MVVM app setup.


Not sure if this is a general Ext question:
But what is the "best practice" way to exchange the map and its layers between the different components?


You can pass in the map or better a MapComponent, like https://github.com/JakobMiksch/HelloGeoExt/blob/master/app/view/main/Map.js, as config property of your own component. ExtJS will handle it like a member variable in your instance. If that is not possible for your whatever reason you can query arbitrary component instances with Ext.ComponentQuery.query (https://geoext.github.io/geoext3/master/docs-w-ext/#!/api/Ext.ComponentQuery). So a

Ext.ComponentQuery.query('mappanel')

might be a helpful command. Even I like it more to pass over dependencies as config.

Cheers
Chris


Is there any rather simple GeoExt based app that I could use a template?

Cheers and have a nice weekend,
Jakob

Am 13.06.2018 um 10:30 schrieb Seth G:
Hi Jakob,

https://github.com/terrestris/BasiGX  has a good collcetion of tools and 
utilities.

Seth

--
web:http://geographika.co.uk
twitter: @geographika

On Wed, Jun 13, 2018, at 9:39 AM, Jakob Miksch wrote:
Dear list,

I am getting into Ext and GeoExt and I am looking for examples where I
could learn from. I already found these:

https://github.com/terrestris/shogun2-client
https://github.com/OpenBfS/gis-client

and of course the tutorials:
https://github.com/geoext/geoext3-ws
https://github.com/geoext/geoext3/blob/master/universal-app.md

Could you point me to any other existing projects with GeoExt?

kind regards,
Jakob
_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users




_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

--
*Jakob Miksch* | *Researcher*
University of Salzburg | Department of Geoinformatics - Z_GIS
Schillerstrasse 30 | 5020 Salzburg, Austria
Phone: +43 (0)662 8044 7529
E-mail: jakob.mik...@sbg.ac.at <mailto:jakob.mik...@sbg.ac.at> | http://www.zgis.at


_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

--
*Jakob Miksch* | *Researcher*
University of Salzburg | Department of Geoinformatics - Z_GIS
Schillerstrasse 30 | 5020 Salzburg, Austria
Phone: +43 (0)662 8044 7529
E-mail: jakob.mik...@sbg.ac.at <mailto:jakob.mik...@sbg.ac.at> | http://www.zgis.at
_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to