ThinkGeo.com    |     Documentation    |     Premium Support

Tooltip or Popup over a Feature

Hi everyone.


 


I want to know if it's possible to add a tooltip or a popup when you are over a feature in a dynamic overlays ?


I saw a popup on a marker. Is it possible to apply that to a feature ?


Thanks in advance.



Popup or tooltip is not allowed to add to a feature. Feature is supposed to be added to a layer overlay (be added to a layer first and then add the layer to a layer overlay) and one layer overlay is an image on client part, you can see that’s why we don’t support popup for features.  
  
 If you want to have the popup on point features, you can convert the features to markers. We have a FeatureMarkerOverlay class which can easily get markers from a data source (like ShapeFileDataSource). One thing to be aware here is we should avoid showing too many markers in a map, each marker will be passed to client and rendered on client part, too many of them will lead to some performance issue. 
  
 If you want to have the popup on an AreaFeature, you can get some idea from the sample samples -> Overlays->Highlight a feature while hovering. But basically we don’t recommend that as it needs to transfer all the feature data to client part, that’s a lot of cost for performance. 
  
 Hope that answers your question. Let us know if you for any queries.  
  
 Thanks, 
  
 Ben 


Thanks for your answer.


 


Is it possible to add a label (a column) on the HighlightOvelay's features ? 



Pierre,


We don’t support adding labels to the HighlightOverlay as we don’t want Column Values be transferred to client part, for its size varies and may be too big to have a good performance. For your case, we recommended to add another layerOverlay which renders all the labels beneath the HighlighOverlay.
 
Thanks,
 
Ben

Hello,


 


Thank you for all your answer. I will have to find another way to display the names.  



Thank you again for everything.



Anything we can help to make your coding easier, just let us know 
  
 Ben