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,LawrenceCity of London
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]
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.
else if (layer is FeatureLayer) { var FeatServId:Number = Number.NaN; var msName:String = FeatureLayer(layer).url.replace("FeatureServer","MapServer"); var x:String = msName.substring(msName.length - 9); if(msName.substring(msName.length - 9) != "MapServer") { httpServ.url = msName.substring(0,msName.lastIndexOf("/")) + "/legend?f=json"; FeatServId = parseInt(msName.substring(msName.lastIndexOf("/")+ 1)); }else{ httpServ.url = msName + "/legend?f=json"; } httpServ.resultFormat = "text"; lname = FeatureLayer(layer).id; httpServ.addEventListener(ResultEvent.RESULT,function(event:ResultEvent):void{processLegend(event,lname,FeatServId)}); httpServ.send(); }
I'm experiencing an error with a map service that is published as both a feature service and a mapservice when I hit the properties button:I have the feature service layers excluded in the xml so that only dynamic map services will show up.All other map services that are not published as feature service will show the properties. any ideas
Hello zilla,thanks for the last update.But, now i've got an error popup when the property button in front of a service is clicked (the buttons in front of groups or layers are ok)error : Null object reference at :Legend2.Handlers:DynamicMapDetailHandler/buildMapDespt()DynamicMapDetailHandler.as at line 71and i still have the problem whith the checkbox of groups an layers until the checkbox of the service is not checked/uncheckedErwan
TypeError: Error #1009: Cannot access a property or method of a null object reference. at widgets.Legend2.Handlers::DynamicMapDetailHandler/buildMapDespt() at widgets.Legend2.Handlers::DynamicMapDetailHandler/buildDetailForm() at widgets.Legend2.Handlers::DynamicMapDetailHandler/result() at com.esri.ags.tasks::DetailsTask/handleDetails() at Function/http://adobe.com/AS3/2006/builtin::call() at com.esri.ags.tasks::BaseTask/handleResult() at MethodInfo-1684() at mx.rpc::Responder/result() at mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyResult() at mx.rpc.events::ResultEvent/http://www.adobe.com/2006/flex/mx/internal::callTokenResponders() at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler() at mx.rpc::Responder/result() at mx.rpc::AsyncRequest/acknowledge() at DirectHTTPMessageResponder/completeHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete()
I'm actually on 10 already. I don't know if my service is available to the public, though. How would I determine that? If I had to take my best guess, I'd guess it's not, as we operate in an environment where internet is not available, only intranet. Thanks for your help, and I'll look forward to hearing back from you...Justin
Hi Justin, Actually the widget depends on a shared tool on arcgis.com/sharing/tools/legend?soapUrl=xyz to generate a legend on 9.3.1. Your service (SOAP) has to be accessible to the public, so the shared tool could generate the legend for your service. It is definitely possible to write a separate tool on my own, but I am not sure if it's worth the effort, since more and more people are moving to 10 (fast). Sorry about that. I posted that limitation a couple of days ago in Code Gallery. What is your time frame of moving to 10 like?
Plaizilla,When I tried to implement your widget I get the following error message:Failed to load the legend for StatesCode: 500Error: Unable to generate legends: iiakdenipl00120Unable to connect to Host: iiakdenipl00120 Port: -1Please verify the Service URL specified is correct :- http://iiakdenipl00120/ArcGIS/services/AMV/States/MapServerThe URL is correct (all the data displays correctly on the map) - do you have any idea what's going on?Thanks for a great widget, and I'll look forward to hearing your response...Justin
Plaizilla Until you decided whether to support WMS, or not...is there a way to turn off the messag boxes when there are WMS layers referenced in the config file?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.