POST
|
Can´t be some error in WidgetManager.mxml ? case "feature": { var featureLayer:FeatureLayer = new FeatureLayer(url); featureLayer.addEventListener(FlexEvent.HIDE, featureLayer_hideHandler); featureLayer.alpha = alpha; featureLayer.id = label; featureLayer.name = label; featureLayer.maxAllowableOffset = maxAllowableOffset; featureLayer.outFields = [ '*' ]; // TODO: be smarter featureLayer.token = token; featureLayer.visible = visible; featureLayer.useMapTime = useMapTime; featureLayer.clusterer = clusterer; if (useAMF) { featureLayer.useAMF = (useAMF == "false"); } if (mode) { featureLayer.mode = mode; } if (definitionExpression) { featureLayer.definitionExpression = definitionExpression; } if (proxyUrl && useProxy) { featureLayer.proxyURL = proxyUrl; } // example for hard-coding layer symbology, e.g. for pre-10.0 ArcGIS Servers /* if (label == "Traffic Cameras") // the layer label in main configuration file { var picSymbol:PictureMarkerSymbol = new PictureMarkerSymbol("assets/images/i_camera.png",30,30,0,0,0); var rend:Renderer = new SimpleRenderer(picSymbol); featureLayer.renderer = rend; } */ layerObject.layer = featureLayer; featureLayer.addEventListener(LayerEvent.LOAD_ERROR, layer_loadErrorEvent); featureLayer.addEventListener(LayerEvent.LOAD, layer_loadEvent); map.addLayer(featureLayer); break; } I have already solve the problem. Widget for Feature tooltips need to work with mapservice running on ArcGis Server 10.x and higher, and in Flash Builder (I use FB 4.0) must be used SDK 4.5.1. Widget is nice. It would be better with possibility to show not only values of selected fields, but also labels for this values. It means for example name of the field. Can you give help ?
... View more
12-07-2011
11:02 PM
|
0
|
0
|
202
|
POST
|
Petr, It's time for you to call esri tech support than as it seems you are doing every thing correctly and it still does not work. Can´t be some error in WidgetManager.mxml ? case "feature": { var featureLayer:FeatureLayer = new FeatureLayer(url); featureLayer.addEventListener(FlexEvent.HIDE, featureLayer_hideHandler); featureLayer.alpha = alpha; featureLayer.id = label; featureLayer.name = label; featureLayer.maxAllowableOffset = maxAllowableOffset; featureLayer.outFields = [ '*' ]; // TODO: be smarter featureLayer.token = token; featureLayer.visible = visible; featureLayer.useMapTime = useMapTime; featureLayer.clusterer = clusterer; if (useAMF) { featureLayer.useAMF = (useAMF == "false"); } if (mode) { featureLayer.mode = mode; } if (definitionExpression) { featureLayer.definitionExpression = definitionExpression; } if (proxyUrl && useProxy) { featureLayer.proxyURL = proxyUrl; } // example for hard-coding layer symbology, e.g. for pre-10.0 ArcGIS Servers /* if (label == "Traffic Cameras") // the layer label in main configuration file { var picSymbol:PictureMarkerSymbol = new PictureMarkerSymbol("assets/images/i_camera.png",30,30,0,0,0); var rend:Renderer = new SimpleRenderer(picSymbol); featureLayer.renderer = rend; } */ layerObject.layer = featureLayer; featureLayer.addEventListener(LayerEvent.LOAD_ERROR, layer_loadErrorEvent); featureLayer.addEventListener(LayerEvent.LOAD, layer_loadEvent); map.addLayer(featureLayer); break; }
... View more
12-06-2011
01:16 AM
|
0
|
0
|
202
|
POST
|
Also see: http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/tasks/GeometryService.html Thanks for Your perfect widget. I have one problem with accuracy in tranformation form "S_JTSK Krovak" (102067) to "WGS84" (4326). It seems taht tranformation uses default method with accuracy appr. 100 meters. Is it possible to implement some better tranformation methods. For example In ArcMap is possibility to set it when You load layer to MXD. Thanks in advance.
... View more
11-24-2011
08:22 PM
|
0
|
0
|
424
|
POST
|
Below is the sample code written by an ex-team member. hope this helps. <?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:esri="http://www.esri.com/2008/ags" viewSourceURL="srcview/index.html">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import com.esri.ags.geometry.MapPoint;
import com.esri.ags.layers.Layer;
import com.esri.ags.layers.TiledMapServiceLayer;
import mx.events.FlexEvent;
import spark.filters.ColorMatrixFilter;
[Bindable]private var activeLayer:Layer;
private var rLum : Number = 0.3086;
private var gLum : Number = 0.6094;
private var bLum : Number = 0.0820;
private var bwMatrix: ColorMatrixFilter = new spark.filters.ColorMatrixFilter(
[rLum, gLum, bLum, 0, 0,
rLum, gLum, bLum, 0, 0,
rLum, gLum, bLum, 0, 0,
0, 0, 0, 1, 0]);
private function applyTheme(name:String):void
{
activeLayer = myMap.getLayer(mapBB.selectedItem);
switch (name)
{
case "Default" :
clearThemes();
break;
case "Dark":
applyDarkTheme();
break;
case "Light":
applyLightTheme();
break;
case "Midnight Blue":
applyMidnightBlueTheme();
break;
}
}
private function clearThemes():void
{
activeLayer.filters = [];
activeLayer.transform.colorTransform = new ColorTransform();
}
private function applyDarkTheme():void
{
clearThemes();
activeLayer.filters = [bwMatrix];
activeLayer.transform.colorTransform = new ColorTransform(-1,-1,-1,1,256,256,256,0);
}
private function applyLightTheme():void
{
clearThemes();
activeLayer.filters = [bwMatrix];
}
private function applyMidnightBlueTheme():void
{
clearThemes();
activeLayer.transform.colorTransform = new ColorTransform(-1,-1,-1,1,256,256,256,0);
}
private function layerShowHandler(event:FlexEvent):void
{
// update the LODs/zoomslider to use/show the levels for the selected base map
var tiledLayer:TiledMapServiceLayer = event.target as TiledMapServiceLayer;
myMap.lods = tiledLayer.tileInfo.lods;
}
protected function colorBB_clickHandler(event:MouseEvent):void
{
applyTheme(event.target.label);
}
]]>
</fx:Script>
<esri:Map id="myMap"
level="4"
load="myMap.centerAt(new MapPoint(-11713000, 4822000))">
<esri:ArcGISTiledMapServiceLayer id="Streets" show="layerShowHandler(event)"
url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
visible="{mapBB.selectedIndex == 0}"/>
<esri:ArcGISTiledMapServiceLayer id="Topo" show="layerShowHandler(event)"
url="http://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"
visible="{mapBB.selectedIndex == 1}"/>
<esri:ArcGISTiledMapServiceLayer id="Imagery" show="layerShowHandler(event)"
url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"
visible="{mapBB.selectedIndex == 2}"/>
</esri:Map>
<s:ButtonBar id="mapBB"
right="5"
selectedIndex="0"
top="10" click="applyTheme(colorBB.selectedItem)">
<s:dataProvider>
<s:ArrayList>
<fx:String>Streets</fx:String>
<fx:String>Topo</fx:String>
<fx:String>Imagery</fx:String>
</s:ArrayList>
</s:dataProvider>
</s:ButtonBar>
<s:ButtonBar id="colorBB" selectedIndex="0"
right="5" top="50" click="colorBB_clickHandler(event)" >
<s:dataProvider>
<s:ArrayCollection>
<fx:String>Default</fx:String>
<fx:String>Light</fx:String>
<fx:String>Dark</fx:String>
<fx:String>Midnight Blue</fx:String>
</s:ArrayCollection>
</s:dataProvider>
</s:ButtonBar>
</s:Application> Thank You very much. Could You implemet it to FlexViewer 2.4 ? I´m not programmer, so I don´t know to implement Your code to 2.4. I suppose Your code is for index.html in FlexViewer version 1.x, but version 2.4 seems different. Can You help me with implementation. Thanks in advance.
... View more
09-22-2011
03:54 AM
|
0
|
0
|
196
|
POST
|
Don´t anybody knows how to change color schema of tiled basemap in color PNG? The one way is make new mapservice created as a clone of original mapservice, convert all tiles to grayscale PNG and save them instead of original color tiles. But I am looking for solution to display color tiles in grayscale using some filter or somethink like this. Can You help ?
... View more
09-18-2011
11:59 PM
|
0
|
2
|
495
|
POST
|
Petr, Sorry I did not mean to have the /0 on the end of the url. Is the layer scale dependent? So what is suppose to work is this: <layer label="vrstevnice" type="feature" visible="true" alpha="0.8" url="http://gishzskv:8399/arcgis/rest/services/vrstevnice/MapServer/0" popupconfig="popups/PopUp_vrstevnice.xml"/> Try adding it this way: <layer label="vrstevnice" type="feature" visible="true" alpha="0.8" url="http://gishzskv:8399/arcgis/rest/services/vrstevnice/MapServer/0" mode="onDemand"/> and zoom specifically to an area where the layer should be. I tryed it, but the result is the same - I don´t see layer in map.
... View more
09-08-2011
02:10 AM
|
0
|
0
|
202
|
POST
|
Petr, So what happens if you use this: <layer label="vrstevnice" type="dynamic" visible="true" alpha="0.8"
url="http://gishzskv:8399/arcgis/rest/services/vrstevnice/MapServer/0">
<sublayer id="0" popupconfig="popups/PopUp_vrstevnice.xml"/>
</layer> Do you see your mapservice on the map and specificly does layer 0 draw and have popups working? When I write "...MapService/0" so I don´t see mapservice in map. I have to write it without "/0".
... View more
09-07-2011
04:22 AM
|
0
|
0
|
202
|
POST
|
Petr, So you next issue is that a layer with type feature is already pointing to a specific layer in the map service to you adding a sublayer child is wrong: <layer label="vrstevnice" type="feature" visible="true" alpha="0.8"
url="http://gishzskv:8399/arcgis/rest/services/vrstevnice/MapServer/0" popupconfig="popups/PopUp_vrstevnice.xml"/>
I understand what You mean, but I have already tryed this combination a wrote the code this way: <layer label="vrstevnice" type="feature" visible="true" alpha="0.8" url="http://gishzskv:8399/arcgis/rest/services/vrstevnice/MapServer/0" popupconfig="popups/PopUp_vrstevnice.xml"/> but the result it the same. Always I write URL with number of layer, or type=feature I get the same result = layer is in TOC but not visible in map. I suppose the problem is in version of AGS (9.3). Maybe in AGS 10 it works, but not in 9.3 ?
... View more
09-05-2011
07:53 AM
|
0
|
0
|
237
|
POST
|
Petr, No this does not mean that you have a feature service. Specifying a layer type as feature is not the same as using a feature service. You can use a Flex Viewer layer type of feature and have it pointing to a MapService URL. Hi, so I have problem, as I already writed before, when I try to set for example: <layer label="vrstevnice" type="feature" visible="false" alpha="0.8" url="http://gishzskv:8399/arcgis/rest/services/vrstevnice/MapServer/0"> <sublayer id="0" popupconfig="popups/PopUp_vrstevnice.xml"/> </layer> where is specified layer with number in map service, I see only name of layer in TOC, but this layer is not visible in map. The same way works in my 2.4 FlexViewer layers KML. Don´t you know where can be problem ? I think it is probably because of AGS 9.3.1. Probably only AGS 10x supports feature and KML type...?...
... View more
09-04-2011
08:58 PM
|
0
|
0
|
237
|
POST
|
Petr, Are you specifying a specific layer of the map service when you switch to type="feature"? Like this: <layer label="Fires" type="feature" visible="false" alpha="1.0"
popupconfig="popups/PopUp_Fires.xml"
url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"/> Have you configured your layer in the FeatureTooltipWidget.xml? Does it mean taht service must be as "feature service" ? My AGS 9.3.1 doesn´t publish to it.
... View more
09-02-2011
04:38 AM
|
0
|
0
|
237
|
POST
|
I keep geting the error message, "[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"] http response status: 404 Fault Code: Server.Error.Request Fault Info: HTTP request error Fault Details: Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: http://rtams.org/flexviewer/widgets/InfoTemplates/CTASTATIONS.xml" I have my files in SDE here is what my xml file looks like <layer label="CTA Stations" type="feature" visible="true" info="widgets/InfoTemplates/SimpleInfoWinWidget.swf" infoconfig="widgets/InfoTemplates/CTASTATIONS.xml" url="http://rtamsp2.ai.uic.edu:8399/arcgis/rest/services/sdeLayers/MapServer/0"/> Any ideas? I added the filed names to the infotemplates. Feature Access is also turned on in ServerManager. in config.xml Try to write URL without specification of number of layer in rest service url="http://rtamsp2.ai.uic.edu:8399/arcgis/rest/services/sdeLayers/MapServer"/>
... View more
09-01-2011
09:14 PM
|
0
|
0
|
273
|
POST
|
Please, give advice for two questions: 1/ how to use such new PopUpRendererSkin.mxml ? How to do, use this skin for example PopUp windows ? In main config.xml I have for example: <operationallayers> <layer label="vrstevnice" type="dynamic" visible="false" alpha="0.8" url="http://gishzskv:8399/arcgis/rest/services/vrstevnice/MapServer"> <sublayer id="0" popupconfig="popups/PopUp_vrstevnice.xml"/> </layer> </operationallayers> and in the section popups I created "PopUp_vrstevnice.xml" How to manage, the PopUp window for this case use PopUpRendererSkin.mxml and not default? 2/ How to do to open popup windows without clicking on object in map, but by moving over object ? Thanks
... View more
09-01-2011
03:45 AM
|
0
|
0
|
835
|
POST
|
Alison, You missed where I said to change center to left instead. You will find it on row n.340 in "HeaderControllerWidget.mxml", which is under wigdets/HeaderController
... View more
09-01-2011
03:24 AM
|
0
|
0
|
327
|
POST
|
Please, can You give me advice about pop-up window? I use FlexViewer 2.4 and AGS 9.3.1 services, and for one operational layer need to use pop-up window, which is opened immediately after mouse cursor run over feature in map, not by clicking on object as it is now. Is it any possibility to configure own pop-up for this case? Thanks
... View more
08-31-2011
11:23 PM
|
0
|
0
|
215
|
POST
|
Hi, I tryed widget too, but I have problem, it doesn´t work. When I set "type=feature" the layer is not visible in flex viewer. Maptips are not displayed. I tryed PopUp from ESRI, but it is displayed only after map klik on feature. Don´t you know how to set popup window to display immediately when mouse cursor stop on feature ?
... View more
08-30-2011
10:42 PM
|
0
|
0
|
237
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|