ThinkGeo.com    |     Documentation    |     Premium Support

ToolTips

In version 2.0 tooltips were a built in feature, in fact there was an ability to provide a custom tool tip control.  I used that pretty heavily and users really like it.  Now in the 3.0 version i see you have decided to remove that functionality.  To emulate similar functionality i'm subscribing to the Map.MouseMove event getting the mouse coordinates and converting it into a PointShape using Extent Helper, then ultimately having to do a query like...



 


<Feature> features = fLayer.QueryTools.GetFeaturesContaining(new string[] {toolTipField } );


 


The problem i'm running into is this query in a larger layer file with say 50,000 polygons seems to be really slowing down the performance.


Can you recommend what the best way would be to now do a tooltip and to to get a field out of the shapefile to display for a tooltip.  MouseMove fires *very* often and i think is dragging it down in performance


 


Thanks,


Chad


 


pointShape,



Collection



nevermind, i didnt have an index file on the shape file.  adding one made a huge difference.  i dont think this an issue anymore.



Chad, 
  
 That’s great. Index file is very important for Shape File data and we always recommend generating it before using the data. Anytime you have a performance issue with shape file, please always check first whether the index file is there. 
  
 Thanks, 
  
 Ben. 


Chad, 
  
    am pretty sure that if you do not have an index file it will throw and exception and you specifically need to override it with a property set.  Did you do this?  Maybe the exception message was not really clear that you needed it for speed?  I want to make sure we have good exception messages.  Do you  have any suggestions on how we could make that message better? 
  
 David

actually i was explicitly setting RequireIndex (or something like that) on the shapefile to false so i wasnt getting the exception.



That makes sense. That’s one way avoid throwing the exception if you just need to do some simple test with the data, we still recommend to generate the index file for most cases. 
  
 Ben