Select to view content in your preferred language

Feature Layer Tips (rscheitlin) configuration error

4000
27
08-09-2011 08:30 AM
BillDickinson
Emerging Contributor
I am using Rob Scheitlin's Feature Layer Tips Flex widget and I am having some problems.

I set up the feature layers as suggested, but when I uncomment the main widget line in config.xml the application never fully loads. The Layer widget never fully loads either, so I think it is getting caught up with getting the right info out of the map service. If I comment out the Feature Layer Tips widget line then the application runs fine, so I know it is this widget that is causing the problems.

Here's the widget line:

<widget left="0" top="0" config="widgets/FeatureTooltip/FeatureTooltipWidget.xml" url="widgets/FeatureTooltip/FeatureTooltipWidget.swf"/>


I've triple checked that the paths are correct in my local directory structure. I'm attaching it to the following layer:

<layer label="FO Locations" type="feature" visible="true" alpha="1" url="http://50.56.25.234/arcgis/rest/services/serviceDelivery/MapServer/0"/>


You can check out the Map Service to see what the layer is like. It is a point layer with some 1300 points in it. I bumped up the max return features on the map service to 1500 just in case it was hitting the 1000 default setting. I also figured it might be the number of points, so I tried this layer which has only about a dozen:

<layer label="Region Labels" type="feature" visible="true" alpha="1" url="http://50.56.25.234/arcgis/rest/services/serviceDelivery/MapServer/1"/>


I'm using ArcGIS Server 10.1 with the FlexViewer 2.4. Any clues on what I am doing wrong would be appreciated (from anyone). 😉

Thanks. Bill
Tags (2)
0 Kudos
27 Replies
PetrTrefil
Deactivated User
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".
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
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.
0 Kudos
PetrTrefil
Deactivated User
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.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
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.
0 Kudos
PetrTrefil
Deactivated User
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;
                    }
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Petr,

   Have you tried:
layer label="vrstevnice" type="feature" visible="true" alpha="0.8"  url="http://gishzskv:8399/arcgis/rest/services/vrstevnice/MapServer/0" mode="onDemand" useamf="false"/>
I am really out of ideas that is why I told you to contact esri Tech support.
0 Kudos
PetrTrefil
Deactivated User
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 ?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Petr,

   The feature Layer Tip widget was only designed to show the attribute value. If you need more than that then you should consider a popup instead.
0 Kudos