[Users] Base Layers No Longer Switch
IT Intern
itintern12 at gmail.com
Tue Jan 25 17:58:49 CET 2011
Hello GeoExt List,
I had been using GeoExtJS 0.7 and Ext-3.2.1 to create a map. Everything was
going fine and I recently upgraded both libraries, GeoExtJS to 1.0 and ExtJS
to 3.3.0. Now it seems the upgrade is relevant to this, as when I switch
back to ExtJS 3.2.1 or just switch back to GeoExtJS 0.7, my base layers are
always able to switch as the user clicks away at the radio buttons in the
base layer container. Otherwise with GeoExtJS 1.0 & ExtJS 3.3.0 as a team
the layers have stopped switching. Whatever base layer has loaded is the
one that stays and even if the buttons are switched in the layer container
it just does no good. Has anyone else experienced this? Any ideas? Seems
like it's not a common issue as Googling did not give me any results
pertaining to this problem :(
I really do not want to go back to ExtJS 3.2.1 as I am already using
features in ExtJS 3.3.0...
Below is the code for my base layers, root node, base layer container and
tree panel:
/*************BASE LAYERS****************/
var ghyb = new OpenLayers.Layer.Google(
"Google Hybrid",
{type: google.maps.MapTypeId.HYBRID}
);
var gmap = new OpenLayers.Layer.Google(
"Google Streets", // the default
{type: google.maps.MapTypeId.ROADMAP}
);
var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{type: google.maps.MapTypeId.TERRAIN}
);
var osm = new OpenLayers.Layer.OSM();
//Add the base layers
map.addLayers([osm, gphy, gmap, ghyb]);
layerRoot = new Ext.tree.TreeNode({
id: 'Root',
text: "All Layers",
expanded: true
});
layerRoot.appendChild(new GeoExt.tree.BaseLayerContainer({
text: "Base Layers",
map: map,
layerStore: mapPanel.layers,
expanded: true
}));
Thank you so much for your time,
elshae
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110125/c6477bca/attachment.htm
More information about the Users
mailing list