|
POST
|
Curious if you have some odd screen resolution/orientation and for some reason it is mapping it off the screen. What happens if you change the config.xml file like this: <widgetcontainer layout="horizontal">
<widget label="Identify" left="9990" top="80" preload="open"
icon="assets/images/i_info.png"
config="widgets/Identify/IdentifyWidget.xml"
url="widgets/Identify/IdentifyWidget.swf"/>
Change the float to horizontal, do a complete refresh of your map <cntrl><F5> and see if the GUI shows up. R_
... View more
10-25-2012
09:45 AM
|
0
|
0
|
1548
|
|
POST
|
OIC, Thanks for the info, that is good "trick" to know. R_
... View more
10-25-2012
08:11 AM
|
0
|
0
|
2495
|
|
POST
|
Stew, When posting, if you press the pound sign icon ( # ) then paste your "code" in between the tags that it puts there, it shows you code much nicer and is a lot easier to interpret. This is how Robert got it to appear in its own "Code:" block above. R_
... View more
10-25-2012
07:34 AM
|
0
|
0
|
2449
|
|
POST
|
Whoops, guess I trimmed it too much for posting. I have it at the bottom of the skin_preinitialize right before the attachmentInspector function: attachmentInspector.addEventListener(AttachmentMouseEvent.ATTACHMENT_CLICK, attachmentInspector_attachmentClickHandler);
hostComponent.parent.parent.parent.parent.addEventListener("close", infoWinClose_Handler);
}
private function attachmentInspector_attachmentClickHandler(event:AttachmentMouseEvent):void I have noticed that it seems to keep a list of all the popup "layers" that I click, and then tries to close "each" of thier respective label feature classes with my closeHandler whenever I close one. I.e., if I click on a building feature, then close the popup, it works fine, then click a Wastesite poly feature and close it, it works, but then I get an error as it tries to close the buildings lables. If I then click on wastelines and close the popup, it works for wastelines, but then get an error as it tries to close the wastepoly lables, then another error as it tries to close the building labels. If I click a wastepoint, it works, then just adds to the list it tries to close and errors on (as they are already closed), and so on. R_
... View more
10-25-2012
07:18 AM
|
0
|
0
|
1467
|
|
POST
|
I have taken the snippets from here: http://forums.arcgis.com/threads/47909-PopUpRendererSkin.mxml-with-Radio-Buttons?p=243845&posted=1#post243845 and am trying to get a radio button on the bottom of my popup window that turns on/off thier respective label service. Everything seems to be working fine as far as the radio buttons, but the infoWinClose_Handler is giving me some issues. It works just fine for the first item/layer clicked on, however, if I get popup info from a "different" layer, I get reference to null object error when I close any other popup window (other than the first one I click on). Here is what I've gotten so far (well, at least the portions I've added) I have tried several "if" statements to try to get it to only change visibility if it was one of the "toggle" layers, and ignore the "other" popups so I don't get the null issues, but have had no luck. I need it to close the layer that was toggled on when the widget is closed. Would really be nice if it would close the toggled on layer when "switching" to a different layer as well. This would probalby solve the null issues. The code that determines which layer to load, toggle on and off, and whether or not to include the toggle buttons is working fine, only the on close function that I'm having issues with. Any ideas? R_ <fx:Script> <![CDATA[ [Bindable] var RBlabel:String; // variable used to capture the current (identified) layer name [Bindable] var RBlayer:String; //variable used to tell which layer to toggle on/off [Bindable] var RBonsel:Boolean = false; // variable used to capture "selected" state of the radio button [Bindable] var RBoffsel:Boolean = true; // variable used to capture "selected" state of the radio button private function skin_preinitializeHandler(event:FlexEvent):void { // set the link styles //My Add off.visible = false; on.visible = false; RBlayer = ""; RBlabel = ""; if (hostComponent.featureLayer.url == "http://gis01.wch-rcc.com/ArcGIS/rest/services/Base/Buildings/MapServer/3"){ off.visible = true; on.visible = true; RBlayer = "Buildings"; RBlabel = "Building Labels"; } if (hostComponent.featureLayer.url == "http://gis01.wch-rcc.com/ArcGIS/rest/services/Base/All_Waste_Sites/MapServer/1"){ off.visible = true; on.visible = true; RBlayer = "WasteSites"; RBlabel = "Point Labels"; } if (hostComponent.featureLayer.url == "http://gis01.wch-rcc.com/ArcGIS/rest/services/Base/All_Waste_Sites/MapServer/2"){ off.visible = true; on.visible = true; RBlayer = "WasteSites"; RBlabel = "Line Labels"; } if (hostComponent.featureLayer.url == "http://gis01.wch-rcc.com/ArcGIS/rest/services/Base/All_Waste_Sites/MapServer/3"){ off.visible = true; on.visible = true; RBlayer = "WasteSites"; RBlabel = "Poly Labels"; } //End My add textLayoutConfiguration = new Configuration(); var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat(); textLayoutFormat.color = getStyle("linkActiveColor") textLayoutFormat.textDecoration = TextDecoration.UNDERLINE; textLayoutConfiguration.defaultLinkActiveFormat = textLayoutFormat; vGroup.addElement(ToggleLayers); // My Add - this is not where I have it, just wanted to include it somewhere. //My Add protected function layerRBgroup_changeHandler(event:Event):void { var map:Map = hostComponent.map; if (event.currentTarget.selectedValue == "on"){ map.getLayer(RBlabel).visible = true; RBonsel = true; RBoffsel = false; } if (event.currentTarget.selectedValue == "off"){ map.getLayer(RBlabel).visible = false; RBoffsel = true; RBonsel = false; } } private function infoWinClose_Handler(event:Event):void { var map:Map = hostComponent.map; map.getLayer(RBlabel).visible = false; RBoffsel = true; RBonsel = false; } } //End My add ]]> </fx:Script> <fx:Declarations> <!--- @private --> <s:RadioButtonGroup id="layerRBgroup" change="layerRBgroup_changeHandler(event)" /> <!--- @private --> <s:HGroup gap="6" verticalAlign="middle" id="ToggleLayers"> <s:RadioButton id="on" value="on" group="{layerRBgroup}" label="Turn Labels On" selected="{RBonsel}" /> <s:RadioButton id="off" value="off" group="{layerRBgroup}" label="Turn Labels Off" selected="{RBoffsel}" /> </s:HGroup> </fx:Declarations> </s:SparkSkin>
... View more
10-24-2012
05:00 PM
|
0
|
12
|
3892
|
|
POST
|
Excellent, thanks yet again. Curious how one is supposed to know how many parent.parent.parent(s) to string together for this? R_ Guess I should start these as new posts so I can give you a check, not just a point.
... View more
10-24-2012
02:51 PM
|
0
|
0
|
2495
|
|
POST
|
I have used this code as a starting point and now have buttons that turn on/off a layer(s) when selected. I would like to be able to make sure the layer is always toggled off when the popup window is closed. I figure I need to attach to the button close event or something, but don't know where to access that. Is this something that is possible? If so, any ideas where I would look? Thanks, R_
... View more
10-24-2012
01:36 PM
|
0
|
0
|
2495
|
|
POST
|
No, have not had time to set up data with sub type, yet alone featureservice. I just noticed in David's code that he is searching against FeatureServer/5. Thought maybe that might be his issue. R_
... View more
10-24-2012
12:04 PM
|
0
|
0
|
834
|
|
POST
|
Does this widget support the subtypes on a FeatureService? didn't see anything about it in the documentation, but all the examples are against MapService. Just a thought, R_
... View more
10-24-2012
11:49 AM
|
0
|
0
|
834
|
|
POST
|
I had to increase my service limit to more than the number of features in the feature class AND change my mode="OnDemand" to get all the features to show, especially the last added features. (though it does slow it down some) http://help.arcgis.com/en/webAPI/flex/help/index.html#//017p00000002000000 R_
... View more
10-24-2012
11:24 AM
|
0
|
0
|
1631
|
|
POST
|
The labels\names\layers look like they match. Am I matching up the correct parts? CONFIG.XML <layer label="Armory Locations" type="dynamic" visible="true" alpha="10.0" url="http://ngnya0-gis-02/NYArcGIS/rest/services/Armory_Locations/MapServer"/> IDENTIFYWIDGET.XML </labels> <useproxy><!-- Enter the label of the MapService from the main config.xml --> <!--<proxymapservice label="Imagery" /> <proxymapservice label="Armory Locations" />--> </useproxy> REST SERVICE: Layer: DMNA_Fac2011_DESCRIP (ID: 0) Display Field: Descrip Type: Feature Layer Geometry Type: esriGeometryPoint Description: Definition Expression: "label_site" = 'SITE' OR "label_site" = 'TNG' Copyright Text: Min. Scale: 0 Max. Scale: 0 Default Visibility: True Extent: XMin: 144442.606310887 YMin: 4495714.38354477 XMax: 698655.175929449 YMax: 4950087.10403643 Spatial Reference: 26918 ������ Fields: � OBJECTID (Type: esriFieldTypeOID, Alias: OBJECTID) � Shape (Type: esriFieldTypeGeometry, Alias: Shape) � SiteNumber (Type: esriFieldTypeString, Alias: SiteNumber, Length: 6 ) � INSTNAME (Type: esriFieldTypeString, Alias: INSTNAME, Length: 34 ) � INSTNAME2 (Type: esriFieldTypeString, Alias: INSTNAME2, Length: 40 ) Type ID Field: N/A Supported Interfaces: REST IDENTIFYWIDGET.XML <layers onlythese="false"> <layer> <name>DMNA_Fac2011_DESCRIP</name> <fields> <field name="INSTNAME2" alias="INSTNAME2" /> popuponly="true" /> </fields>
<layers onlythese="false">
<layer>
<name>DMNA_Fac2011_DESCRIP</name>
<fields>
<field name="INSTNAME2" alias="INSTNAME2" popuponly="true" />
</fields> Try this for your fields tag(s). you are terminating your field tag before setting the popuponly attribute. R_
... View more
10-24-2012
11:10 AM
|
0
|
0
|
2449
|
|
POST
|
Thanks Robert, I knew there is a difference in how it added it depending on how far you drilled into the service. But without ever using appbuilder, wasn't sure exactly what one sees when they add Operational Layers. R_
... View more
10-24-2012
09:17 AM
|
0
|
0
|
1022
|
|
POST
|
I am not familiar with the application builder, but if that is what you are using, then yes, in the application builder, add an Operational Layer and navigate to where ever it is that you published the raster mapservice and add it. You should end up with something like http://gis01.wch-rcc.com/ArcGIS/rest/services/elevation_only/MapServer without a /0 at the end. R_
... View more
10-24-2012
09:14 AM
|
0
|
0
|
1022
|
|
POST
|
I do not use the app building. However, I suspect that once you publish it as a MapService, you would add it just like any other MapService in the app building. Suspect you just go to the raster service, and don't "drill in" to the sublayers as that will make it type="feature". R_
... View more
10-24-2012
08:56 AM
|
0
|
0
|
1022
|
|
POST
|
Try publishing/loading as a MapService as type="dynamic". I get the same error if I try to load a raster as a feature. This works for me to load a raster service: <layer label="Elevation" type="dynamic" visible="true" alpha="0.9"
url="http://myhost.com/ArcGIS/rest/services/elevation_only/MapServer"/> R_
... View more
10-24-2012
07:44 AM
|
0
|
0
|
1022
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-21-2026 08:53 AM | |
| 1 | 05-14-2026 04:28 PM | |
| 1 | 05-07-2026 02:10 PM | |
| 1 | 04-02-2026 09:50 AM | |
| 1 | 04-01-2026 01:21 PM |
| Online Status |
Online
|
| Date Last Visited |
Thursday
|