Select to view content in your preferred language

MapTips HideDelay multiple feature layers

3363
15
02-21-2011 10:43 AM
DaveOrlando
Frequent Contributor
Hello,

I am experiencing some odd behavior after adding a second FeatureLayer (with MapTips) to my map.

It seems that the MapTipHideDelay is only honored by one FeatureLayer at a time?.... If both features are visible and using MapTips, (line and polygon, but not overlapping) it seems like the last loaded MapTip will honor the HideDelay but the other goes back to no hidedelay.

tough to replicate, sometomes they both seem to work, other times not. Is anyone experiencing similar results and also, has there been more work done on maptips since 2.1.0.427

Any help would be great, thanks.
0 Kudos
15 Replies
DarkoRadiceski
Emerging Contributor
Hi all,

We have also tried playing with MouseEnter and Mouse Leave events and resetting the MapTip Hide delay. Also tried setting this in XAML.

None seem to fix the issue.

Any advice on workaround or fix?

I would be happy even if possible to on mouse enter to show the map tip and dont hide it unless the user manualy closes it. To do that on MouseEnter i set map tip to Visible and do not hide it.

However even with doing that the MapTip on mouse leave just dissapears.

hmmm. Almost exausted all options 😞

Any advice appreciated.
0 Kudos
DaveOrlando
Frequent Contributor
Hi Jennifer and DanDan,

Thanks for bringing this thread back to life.

I have still not solved this issue, only ignored it for a few months.

Here is all my xaml and xaml.cs, thought this would be easier than trying to pick out the issues.

Like I mentioned from the top, I have three FeatureLayers: one polygon layer that is 'SelectionOnly' and two line features that are 'OnDemand' with a min resolution set. MapTipHideDelays sometime work, sometimes don't....

Any help will be appreciated, Dave
0 Kudos
JenniferNery
Esri Regular Contributor
I checked that your XAML-code sets the same MapTipHideDelay for the 3 FeatureLayers.
esri:GraphicsLayer.MapTipHideDelay="00:00:01"


You also mentioned that some of the features from different layer overlap, at which time the MapTipHideDelay is not respected - was this the problem? If yes, this is by design. When you enter a new graphic that has map tip, the currently opened map tip will close even if its hide delay time has not yet elapsed.
0 Kudos
DaveOrlando
Frequent Contributor
Hi,

Overlapping features is not the culprit, in some places yes they do overlap, but the problem exists in non-overlap situations too. Completely seperate features, Maptips flash and don't allow anymovement inside.

Am I getting too complex by putting buttons inside the MapTip? All three maptips are a different configuration.
0 Kudos
JenniferNery
Esri Regular Contributor
Maptip is handled in the GraphicsLayer. FeatureLayer inherits from GraphicsLayer. This should be similar to your sample only a lot simpler. Also, what's contained in the maptip should not affect when the maptip is opened or closed so for simplicity, I am using a TextBlock.

Please try this or minimize the code sample you sent. If you can provide us the steps to reproduce: like mouse over feature from one layer to the other or have some of the features overlap, etc.
  xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
 <Grid x:Name="LayoutRoot" Background="White">

  <Grid.Resources>
   <esri:SimpleMarkerSymbol x:Key="RedMarkerSymbol" Color="Red" Size="12" Style="Circle" />
   <esri:SimpleLineSymbol x:Key="RedLineSymbol" Color="Red" Width="4" Style="Solid" />
   <esri:SimpleFillSymbol x:Key="RedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
  </Grid.Resources>

  <esri:Map x:Name="MyMap" Background="White">
   <esri:ArcGISTiledMapServiceLayer ID="PhysicalTiledLayer" 
                                             Url="http://services.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer"/>
   <esri:GraphicsLayer ID="Area" >
    <esri:GraphicsLayer.MapTip>
     <TextBlock Text="Area" esri:GraphicsLayer.MapTipHideDelay="00:00:01" />
    </esri:GraphicsLayer.MapTip>
    <esri:GraphicsLayer.Graphics >     
     <esri:Graphic Symbol="{StaticResource RedFillSymbol}">
      <esri:Polygon >
       <esri:Polygon.Rings>
        <esri:PointCollection>
         <esri:MapPoint X="110.039" Y="-20.303" />
         <esri:MapPoint X="132.539" Y="-7.0137" />
         <esri:MapPoint X="153.281" Y="-13.923" />
         <esri:MapPoint X="162.773" Y="-35.174" />
         <esri:MapPoint X="133.594" Y="-43.180" />
         <esri:MapPoint X="111.797" Y="-36.032" />
         <esri:MapPoint X="110.039" Y="-20.303" />
        </esri:PointCollection>
       </esri:Polygon.Rings>
      </esri:Polygon>
     </esri:Graphic>
    </esri:GraphicsLayer.Graphics>
   </esri:GraphicsLayer>
   <esri:GraphicsLayer ID="Line" >
    <esri:GraphicsLayer.MapTip>
     <TextBlock Text="Line" esri:GraphicsLayer.MapTipHideDelay="00:00:01" />
    </esri:GraphicsLayer.MapTip>
    <esri:GraphicsLayer.Graphics >
     <esri:Graphic Symbol="{StaticResource RedLineSymbol}" >
      <esri:Polyline >
       <esri:Polyline.Paths>
        <esri:PointCollection>
         <esri:MapPoint X="0" Y="51.399" />
         <esri:MapPoint X="2.637" Y="48.865" />
         <esri:MapPoint X="12.568" Y="41.706" />
         <esri:MapPoint X="13.447" Y="52.483" />
         <esri:MapPoint X="21.357" Y="52.160" />
         <esri:MapPoint X="30.322" Y="59.845" />
        </esri:PointCollection>
       </esri:Polyline.Paths>
      </esri:Polyline>
     </esri:Graphic>
    </esri:GraphicsLayer.Graphics>
   </esri:GraphicsLayer>
   <esri:GraphicsLayer ID="Point" >
    <esri:GraphicsLayer.MapTip>
     <TextBlock Text="Point" esri:GraphicsLayer.MapTipHideDelay="00:00:01" />
    </esri:GraphicsLayer.MapTip>
    <esri:GraphicsLayer.Graphics >
     <esri:Graphic Symbol="{StaticResource RedMarkerSymbol}" >
      <esri:MapPoint X="-140.9" Y="63.391" />
     </esri:Graphic>     
    </esri:GraphicsLayer.Graphics>
   </esri:GraphicsLayer>
  </esri:Map>
 </Grid>
</UserControl>
0 Kudos
DaveOrlando
Frequent Contributor
2.2 seems to have cleared this up, (please note that the original post refers to build 2.1.0.427)

😄

Dave
0 Kudos