Select to view content in your preferred language

Map tips not working when change binding field

997
4
08-25-2011 10:36 AM
MichaelKohler
Frequent Contributor
I have an app that is deployed and running. User wanted me to change a field in the map tip. I added a new field to the dataset and added the field name to the OutFields in my XML and changed the field name in the binding for the map tip. However the map tip doesn't display any data! If I do an identify, the new field shows up in the data grid and all is well. Except the map tips. Oddly enough if I check in REST it doesn't show that the new field is added.

What is up!


 <esri:FeatureLayer  ID="Future Landuse" Url="http://myserver.com/ArcGIS/rest/services/Zoning/MapServer/1" Opacity="0.50" Visible="False" OutFields="LULEGEND,LUVALUE">
                    <esri:FeatureLayer.MapTip>
                        <Border CornerRadius="10" BorderBrush="#FF222957" BorderThickness="3" Margin="0,0,15,15">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="1.038,1.136" StartPoint="0.015,0.188">
                                    <GradientStop Color="#FFD1DFF2"/>
                                    <GradientStop Color=" #FF0088FF" Offset="0.946"/>
                                </LinearGradientBrush>
                            </Border.Background>
                            <Border.Effect>
                                <DropShadowEffect ShadowDepth="10" BlurRadius="14" Direction="300"/>
                            </Border.Effect>
                            <StackPanel Orientation="Vertical" Margin="7">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="Future Landuse: " Foreground="Black"/>
                                    <TextBlock Text="{Binding [LUVALUE]}" FontWeight="Bold" Foreground="Black"/>
                                </StackPanel>
                            </StackPanel>
                        </Border>
                    </esri:FeatureLayer.MapTip>
                </esri:FeatureLayer>
0 Kudos
4 Replies
JenniferNery
Esri Regular Contributor
It could be that your service have not taken this update? You can run fiddler and look at WebForms to see the parameters used by your Silverlight app and then apply them to the REST end point from your web browser to see if the new field will be returned.

It should be enough to update OutFields and Binding statement so your issue could be the service as you mentioned the service does not reflect this change in fields.
0 Kudos
MichaelKohler
Frequent Contributor
It appears that the only attributes REST is returning is the LULEGEND field.

got this url from fiddler:  //myserver.com/ArcGIS/rest/services/Zoning/MapServer/1/query?returnGeometry=true&spatialRel=esriSpatialRelIntersects&where=1%3d1&outSR=102100&outFields=LULEGEND%2cLUVALUE&f=json&_ts=634498856559033332&

and I get returns like this:  {"attributes":{"LULEGEND":"I"},"geometry":{"rings":.........

So I guess it's not returning the LUVALUE field.
0 Kudos
MichaelKohler
Frequent Contributor
Who knows... I put up a test page and went home. It worked. Came in today and updated the main site and it works. I guess it took some time for REST to update.


edit:
So I also updated my parcels this morning and couldn't see them in my apps. I found this thread http://forums.arcgis.com/threads/35803-ArcGIS-Map-Services-not-updated-after-publishing?highlight=RE...

Clearing the REST cache fixed the parcels and I assume it would have fixed the original issue as well.
0 Kudos
ChristopherHill
Deactivated User
Yeah, the server will cache your services to increase performance. If you make major changes like adding additional columns to your database and republishing the service you may need to clear you cache for the server to update the REST service.
0 Kudos