Select to view content in your preferred language

silverlight maptips

2394
10
12-01-2010 04:15 AM
lyndamccallum
New Contributor II
I'm having an on going problem with maptips.

I have the follow layers defined in my xaml file where MyFeatureLayer is the maptips layer.

<esri:ArcGISTiledMapServiceLayer ID="BaseMap" Url="{StaticResource BaseMap}" ></esri:ArcGISTiledMapServiceLayer>
            <esri:ArcGISDynamicMapServiceLayer ID="BaseLayer" Url="{StaticResource WDPurl}"></esri:ArcGISDynamicMapServiceLayer>
           
            <esri:GraphicsLayer  ID="MyGraphicsLayer"/>
            <esri:GraphicsLayer  ID="FlashFeatureLayer"/>   
                       
               
            <esri:FeatureLayer ID="MyFeatureLayer" Url="{StaticResource FacilitiesLayerID}"  FeatureSymbol="{StaticResource DefaultNoMarkerSymbol}"  >


The problem is every time I put something in mygraphicslayer over an existing point, the maptip for the existing point won't say open long enough to allow me to click on the link within it. All points that are not covered with a feature in the mygraphicslayer work fine. Any ideas?

Another wierd thing is that I don't experience this behaviour when I run in debug mode only once the site is published.

Thanks
0 Kudos
10 Replies
DominiqueBroux
Esri Frequent Contributor
Be sure that your maptip framework element has:
      - IsHitTestVisible set to true
      - a background not null
      - a MapTipHideDelay > 0

If this doesn't help, please share how your maptip looks like.
0 Kudos
lyndamccallum
New Contributor II
Here is my xaml for it

<esri:FeatureLayer ID="MyFeatureLayer" Url="{StaticResource FacilitiesLayerID}"  FeatureSymbol="{StaticResource DefaultNoMarkerSymbol}"  >
                <esri:FeatureLayer.OutFields>
                    <sys:String>FACILITYNAME</sys:String>
                    <sys:String>SITEFROM</sys:String>
                    <sys:String>SITESTREET</sys:String>
                    <sys:String>SITEDIRECTION</sys:String>
                    <sys:String>SITECITY</sys:String>
                    <sys:String>FACILITYNUMBER</sys:String>
                </esri:FeatureLayer.OutFields>
                <esri:FeatureLayer.MapTip>
                    <Border esri:GraphicsLayer.MapTipHideDelay="00:00:01.5" Style="{StaticResource CommonBorder}" Padding="10,3,10,3"  Effect="{StaticResource dropShadow}" IsHitTestVisible="True" >
                        <StackPanel Orientation="Vertical" Margin="20,15,20,15">
                            <StackPanel Orientation="Horizontal" Margin="0,0,0,6">
                                <TextBlock Text="Name: " FontWeight="Bold" Foreground="#FF0F274E" FontSize="12" />
                                <TextBlock Text="{Binding Converter={StaticResource MyDictionaryConverter},
                                    ConverterParameter=FACILITYNAME, Mode=OneWay}" Foreground="#FFFFFFFF" FontSize="12" FontFamily="Portable User Interface" />
                             </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="0,0,0,6">
                                <TextBlock Text="Address: " FontWeight="Bold" Foreground="#FF0F274E" FontSize="12" />
                                <TextBlock Text="{Binding Converter={StaticResource MyDictionaryConverter},
                                    ConverterParameter=SITEFROM, Mode=OneWay}" Foreground="#FFFFFFFF" FontSize="12" FontFamily="Portable User Interface" />
                                <TextBlock Text=" " />
                                <TextBlock Text="{Binding Converter={StaticResource MyDictionaryConverter},
                                    ConverterParameter=SITESTREET, Mode=OneWay}" Foreground="#FFFFFFFF" FontSize="12" FontFamily="Portable User Interface" />
                                <TextBlock Text=" " />
                                <TextBlock Text="{Binding Converter={StaticResource MyDictionaryConverter},
                                    ConverterParameter=SITEDIRECTION, Mode=OneWay}" Foreground="#FFFFFFFF" FontSize="12" FontFamily="Portable User Interface" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="0,0,0,6">
                                <TextBlock Text="***************" FontWeight="Bold" Foreground="#FF0F274E" FontSize="12" />
                                <TextBlock Text="{Binding Converter={StaticResource MyDictionaryConverter},
                                    ConverterParameter=SITECITY, Mode=OneWay}" Foreground="#FFFFFFFF" FontSize="12" FontFamily="Portable User Interface" />
                            </StackPanel>
                            <StackPanel>
                                <!--<TextBlock  Text="Inspection Results" Name="InspectionTextBlock"  Cursor="Hand" TextDecorations="Underline" MouseLeftButtonDown="InspectionTextBlock_MouseLeftButtonDown" Foreground="#FF0F274E" FontSize="12"/>-->
                                <!--<HyperlinkButton x:Name="InspectionHyperlinkButton" TargetName="_blank" Content="{Binding Converter={StaticResource MyDictionaryConverter},ConverterParameter={StaticResource InspectionPage}}" NavigateUri="{Binding Converter={StaticResource MyDictionaryConverter},ConverterParameter={StaticResource InspectionPage}}"  ></HyperlinkButton>-->
                                <HyperlinkButton x:Name="InspectionHyperLinkButton" TargetName="_blank" Content ="Inspection Report" NavigateUri="{Binding Converter={StaticResource UriConverter1}, ConverterParameter=FACILITYNUMBER}" Foreground="#FF0F274E"  FontSize="12"/>
                               
                               
                            </StackPanel>   
                           
                        </StackPanel>
                    </Border>
                </esri:FeatureLayer.MapTip>
            </esri:FeatureLayer>
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I am not sure that your border has a background (depending on how is defined you CommonBorder style).

Please try by setting a background explicitely.

Something like :
 
<Border esri:GraphicsLayer.MapTipHideDelay="00:00:01.5" Background="White" Padding="10,3,10,3" Effect="{StaticResource dropShadow}" IsHitTestVisible="True" >
......


or
 
<Border esri:GraphicsLayer.MapTipHideDelay="00:00:01.5" Background="Transparent"  Style="{StaticResource CommonBorder}" Padding="10,3,10,3" Effect="{StaticResource dropShadow}" IsHitTestVisible="True" >
 
0 Kudos
lyndamccallum
New Contributor II
yes it has a background. It i set it to white as in your code then it covers over the data in the maptip
0 Kudos
DominiqueBroux
Esri Frequent Contributor
But with the White background, does the maptip stay open or not?
0 Kudos
lyndamccallum
New Contributor II
no it doesn't stay open
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Sorry, I am in lack of idea.

With my version, I don't reproduce the behavior after setting a background.

Which API version are you using?
0 Kudos
lyndamccallum
New Contributor II
I'm using arcgis server 9.3.1, and i believe silverlight api 1.2
0 Kudos
lyndamccallum
New Contributor II
sorry i'm using 1.1
0 Kudos