[Users] How to reference layer metadata from a treenode?

27 views
Skip to first unread message

Robert Buckley

unread,
Mar 26, 2012, 7:56:19 AM3/26/12
to us...@geoext.org
Hi

GEOEXT-1.1
OPENLAYERS 2.11

I am using the following to load layers into my treepanel...

{
nodeType: "gx_overlaylayercontainer",
id: "gx_ovContainer_fnp_bsk",
text: "Layer FNP",
expanded: false,
loader: {
filter: function(record){
return record.get("layer").options.themeId == "fnp_bs";
}
     }
}


What I would like to do is add 2 additional options to the layer config called "metadata" and "status" (These text strings could then contain simple abstract about the layer and also the the status which in my case would be a date). I would then like to reference these options and display them in a window or msgbox through a contextmenu with a right click the layer node.

My problem lies in how to reference the layer options. Using var selectedNode = tree.getSelectionModel().getSelectedNode(); I can reference the "text" option of the layer, but not the status or metadata option.

can anyone see where I should be looking to achieve this?

yours,

Rob

Phil Scadden

unread,
Mar 26, 2012, 4:18:49 PM3/26/12
to Robert Buckley, us...@geoext.org
Robert, have a look at
http://kite.gns.cri.nz/PBE/#MAP:pdqConfig.json

(Its a bit slow as on a development server at moment). This is OL and
Geoext, but I have used Alexandre Dube's excellent layer tree panel. I
put explanation on tooltip, links to metadata as hyperlinks on the layer
description (set the layer href property). There is also right-click to
bring up context menu (where I put opacity change, show in google earth,
export to shapefile (for internal users) and I am working on adding zoom
to layer extent). Would this work for you?

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.

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

Reply all
Reply to author
Forward
0 new messages