[Users] Measure Length and Area UX Tools Give Error
IT Intern
itintern12 at gmail.com
Tue Dec 21 20:05:43 CET 2010
Thanks for the response Eric! Here is the code for my tree as you have
requested :)
layerRoot = new Ext.tree.TreeNode({
text: "All Layers",
expanded: true
});
layerRoot.appendChild(new GeoExt.tree.BaseLayerContainer({
text: "Base Layers",
map: map,
layerStore: mapPanel.layers,
expanded: true
}));
//A few other overlay containers are added similarly...
//Tree menu for layers
var layerTree = new Ext.tree.TreePanel({
overflow: 'visible', // For the Combo popup
region: "west",
title: "Map Layers",
root: layerRoot,
loader: new Ext.tree.TreeLoader({applyLoader: false}),
enableDD: true,
collapsible: true,
width: 300,
autoScroll: true,
expanded: false
});
//Adding tree to panel
var panel = new Ext.Panel({
//width: $(window).width(),
height: $(window).height() - 100,
//height: 700,
layout: "border",
id: 'myViewPort',
renderTo: document.body,
items: [layerTree, mapPanel]
//items: [layerTree, legend, mapPanel]
});
"Vector layers created by Point, Path and Polygon handlers (used by the
Measure control) have displayInLayerSwitcher set to false, so they
should appear in the tree"
If the displayInLayerSwitcher is set to false, then shouldn't it be that
these layers should* not* show in my tree? :-/
Thank you for your time and assistance,
elshae
On Tue, Dec 21, 2010 at 12:09 PM, Eric Lemoine
<eric.lemoine at camptocamp.com>wrote:
> On Tuesday, December 21, 2010, IT Intern <itintern12 at gmail.com> wrote:
> > Dear GeoExt Users,
> >
> > I have a map using the ExtJS and GeoExtJS libraries which also
> incorporate the Measure Length and Area UX tools. Things are going pretty
> good, except that when these measuring tools are used, they create extra
> nodes in my tree. The nodes that get created are OpenLayers.Handler.Polygon
> for the Area tool and OpenLayers.Handler.Path for the length tool. Not only
> are these unwanted nodes for me, but these nodes also seem to have some
> impact on my nodes iconCls, as the icon I have set for them change back to
> default when these new nodes are added. I am adding some code here which I
> think may be relevant, but if it is not enough to explain what I am doing, I
> can gladly provide more :)
>
> Hi
>
>
> Vector layers created by Point, Path and Polygon handlers (used by the
> Measure control) have displayInLayerSwitcher set to false, so they
> should appear in the tree if you use a GeoExt layer container for the
> tree. Maybe you're not? You haven't provided the code that creates the
> tree, having this code would probably help people help you.
>
> --
> Eric Lemoine
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemoine at camptocamp.com
> http://www.camptocamp.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20101221/682deca8/attachment.htm
More information about the Users
mailing list