Another Enhanced TOC/Legend Widget

2259
37
03-28-2011 01:05 AM
ZillaPlace
New Contributor
Hi guys,

I don't like an idea of separating TOC and legend. Maybe I am an old-fashion guy, but I like to have a widget where I could see icons and names, turn on/off layers, tell whether or not a layer is in its display scale range. And it has to handle sublayers because I have a lot of layers with subtypes. It would be cool if I could click a layer and see the layer properties. It doesn't have to show all of them, but just some major pieces. You know, something like the TOC in ArcMap.

And some of my friends are still using 9.3.1 and others have gone to 10. The widget should work for all of them, although I wouldn't mind telling them that it runs faster and more smoothly with 10. The widget should load the legend for a meshup of services hosted on either 10 or 9.3.1.

If you were like me, take a look at this widget. You may like it. It's a beta version developed on FlexViewer 2.2.
Tags (2)
0 Kudos
37 Replies
JacksonTrappett
Occasional Contributor II
Two questions:
1. Does anyone have a link to a working sample where I could take a look at this legend widget?

2. Plaizilla, you are still the only person who has written a widget like this.  Any possibility of releasing the code?  Having this as a widget doesn't work for my app, since my table of contents is not running as a widget, and I am also not using the flex viewer so I can't even load it at all.
0 Kudos
MarcCavallaro
New Contributor III
Bump on the code request.

Great job! This TOC/Legend widget is exactly what I need.  I've got it running but I'm using a custom widget skin in my application and I'd like to monkey with the styling a bit.

Offering a six pack of your choosing.

Thanks.
0 Kudos
LeeAllen
Occasional Contributor
Bump on the code request.

Great job! This TOC/Legend widget is exactly what I need.  I've got it running but I'm using a custom widget skin in my application and I'd like to monkey with the styling a bit.

Offering a six pack of your choosing.

Thanks.



That's my only need for the code as well, so I can use it with custom skins.  Make that two six packs!!
0 Kudos
LawrenceDhliwayo
New Contributor
I looks like there are multiple requests on the widget comments to please release code, me being one of them.  This is a great widget, and I really want to implement!!

I have another request/improvement:  Since you now have the symbol and layer name showing up together, is it possible to have the symbol to the left of the layer name instead of below?  This would save much needed space and excessive scrolling.  I have seen this in javascript, picture example is below.

[ATTACH=CONFIG]5691[/ATTACH]


Hi I am looking for the JavaScript sample that does exaclty what is shown on your picture. Does it work on ArcGIS 9.3.1. Woudl you share the code or any leads.

Many thanks,
Lawrence
City of London
0 Kudos
AimeiChen
Occasional Contributor
I wonder if the author release the source code or not. If so, would you please share it here? thanks

AM

Hi I am looking for the JavaScript sample that does exaclty what is shown on your picture. Does it work on ArcGIS 9.3.1. Woudl you share the code or any leads.

Many thanks,
Lawrence
City of London
0 Kudos
LeeAllen
Occasional Contributor
Hi I am looking for the JavaScript sample that does exaclty what is shown on your picture. Does it work on ArcGIS 9.3.1. Woudl you share the code or any leads.

Many thanks,
Lawrence
City of London


I do not actually have that javascript code, it was just from another site that I was looking at.
0 Kudos
ScottAndreasen
New Contributor
Plaizilla-

I'm trying to use your widget in my web mapping application and (being a newbie) I'm having trouble.

I added the code in the Viewer config file and saved the Legend2 folder to the widget folder. Then, I put the SOAP URL in the Arcgis.com shared tool (http://arcgis.com/sharing/tools/legend?soapUrl=xxx&f=html) and generated the TOC (as HTML). The TOC looks great.

What is the next step after that? I was anticipating entering the URL of the shared tool page in the widget config file (xml), but I did not identify a place to add that. Did I miss something or should I be doing something else?

Can you help, or direct me to a resource that can help me figure out what to do next?

Thanks
0 Kudos
PeterHoffman
Occasional Contributor
I have tried this legend 2 widget on my api 2.5 project and I am getting this error when I run it:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.esri.viewer.managers::WidgetManager/createWidget()
at com.esri.viewer.managers::WidgetManager/runWidget()
at com.esri.viewer.managers::WidgetManager/widgetReadyHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ModuleInfoProxy/moduleEventHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ModuleInfo/readyHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::FlexModuleFactory/update()
at mx.core::FlexModuleFactory/docFrameHandler()
at mx.core::FlexModuleFactory/docFrameListener()

The legend widget that comes with the api works fine.

Any ideas?
0 Kudos