Select to view content in your preferred language

Dynamic Layer question..

824
4
07-27-2010 06:24 AM
JoshV
by
Regular Contributor
I have a dynamic layer and I know I can't put Maptips on it but I would like to do something similar so a user could see some attributes when they click a feature or better yet, hover over it.  I took some code from the samples and have shown it below but it gives me a "BAD_PARSER_VALUE" error at the OutFields line.  I'm not sure this is the sample I need based on what I'm asking for above.  Can someone reply and let me know what I need to change?  The first layer in my mapservice is an SDE point featureclass that I want to show at least 2 attributes on mouse hover.

Thanks,

<esri:ArcGISTiledMapServiceLayer ID="AGOLayer" 
                    Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_ShadedRelief_World_2D/MapServer"/>
                            <esri:FeatureLayer ID="MyPointFeatureLayer"
                                   Url="http://localhost/ArcGIS/rest/services/SilverTest/MapServer/0"
                                   FeatureSymbol="{StaticResource YellowMarkerSymbol}" 
                                   OutFields="API,Operator">
                    <esri:FeatureLayer.Clusterer>
                        <esri:FlareClusterer 
                            FlareBackground="#BBFF8C00" 
                            MaximumFlareCount="4" />
                    </esri:FeatureLayer.Clusterer>
                    <esri:FeatureLayer.MapTip>
                        <Grid Background="LightYellow">
                            <StackPanel Margin="5">
                                <TextBlock Text="{Binding [API]}" FontWeight="Bold" />
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="Web site: " />
                                    <TextBlock Text="{Binding [Operator]}" />
                                </StackPanel>
                            </StackPanel>
                            <Border BorderBrush="Black" BorderThickness="1" />
                        </Grid>
                    </esri:FeatureLayer.MapTip>
                </esri:FeatureLayer>
            </esri:Map.Layers>
0 Kudos
4 Replies
JenniferNery
Esri Regular Contributor

<TextBlock Text="{Binding [API]}" FontWeight="Bold" />
<StackPanel Orientation="Horizontal">
  <TextBlock Text="Web site: " />
  <TextBlock Text="{Binding [Operator]}" />
</StackPanel>


These Binding causes the BAD_PARSER_VALUE. I think you meant to put {Binding Attributes[API]} and {Binding Attributes[Operator]}.

Jennifer
0 Kudos
JoshV
by
Regular Contributor
These Binding causes the BAD_PARSER_VALUE. I think you meant to put {Binding Attributes[API]} and {Binding Attributes[Operator]}.

Jennifer


Both on the same line where TextBlock=?  Can you show me what you mean based on my code?  Thanks
0 Kudos
JenniferNery
Esri Regular Contributor
I suggested replacing your binding statements with those on separate lines, since each target a different property. Using your code then, I just replaced those two lines.

Also, you mentioned in your title and question that you are working with DynamicLayer.  I do not see that in your code. You are using ArcGISTiledMapServiceLayer.

If you intend to use a dynamic layer instead, you will need to set MapTip in code-behind after the dynamic layer has initialized.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Do you get this error in Design or in run-time?

I know this kind of error can happen during the design but it should work at run-time.
0 Kudos