PDA

View Full Version : Need help for Openlayers GeoExt in ExtJs 4



gevorgdarbinyan
1 Aug 2013, 2:30 AM
Hi everyone, I need a help for OpenLayers usage in ExtJs 4 to develop RIA application. Is there anyone who has done huge project using OpenLayers(GeoExt) in ExtJs 4. Thanks for attention

wm003
1 Aug 2013, 7:23 AM
i did once in Ext 3 but moved over to leaflet. Much more comfortable ExtJS like coding

gevorgdarbinyan
1 Aug 2013, 10:09 PM
Can you describe the integration mechanism of OpenLayers and GeoExt in ExtJS3, because I have RIA application and it works only in Firefox, in Chrome I am getting errors. The problem is simple how I can integrate OpenLayers to ExtJS4,I want to convert ExtJS 3 to ExtJS4. Thanks

wm003
2 Aug 2013, 12:35 AM
Well as you already said, you can use GeoExt for Ext3 (afaik there is currently no GeoExt for Ext4).
The time back then i was just using the same steps like described in the example pages here (http://api.geoext.org/1.1/examples/mappanel-viewport.html).

But if you really just need to wrap openlayers in a panel/viewport without all that geoext stuff then you might adopt the panel overrides from GeoExt for Ext3 and slightly adjust it to the Ext4 Syntax. Most Syntax from Ext 3 still works in Ext4 anyway.

anhtuan23
1 Dec 2015, 9:04 AM
0down votefavorite (http://stackoverflow.com/questions/32205666/geoext-multiple-maps#)


I am building a webgis app based on GeoExt 2 where the user can add new maps if he wishes in separate windows (Ext.Window). Each map is created with a function which does the following: creates an OL map, gets WMS info from a supplied URL, creates a mapPanel, a layerTree and a legendPanel and adds functionality in case the user selects a specific layer or for controlling the Window.
If I add a new map and then change a layer of the first, the second map's layer changes, instead of the first. What I want is to be able to capture the appropriate map_panel in order to run the map_panel.map.addLayer
In other words the application only knows the last added map as the active one. Should I try and find the layer's tree parent container and from that find the map's id and how can I do this? (or is this something too tedious to do?)
Any other ideas?
Thank you.