Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Please point me to examples of combining OpenLayers and any external tooltip libraries like this. I try to use native OL tools for building tooltips here, but they not flexible and customizable. Thanks.

share|improve this question
up vote 3 down vote accepted

This might not be the best way to do it, but it's one way. You can improve on it.

enter image description here


The key here is to move the wrapper/trigger around onFeatureHighlighted event.

var handler_featurehighlighted = function (e) {

    var tt_trigger = tooltipApi.getTrigger();
    tt_trigger.css({ 'left': mouseEvent.clientX + 'px', 'top': mouseEvent.clientY + 'px' });

    $(".tooltip").html("<strong>Feature Name: " + + "</strong>");;

var handler_featureunhighlighted = function (e) {
var highlightControl = new OpenLayers.Control.SelectFeature(myToolTipLayer, {
    hover: true,
    highlightOnly: true,
    renderIntent: "temporary",
    eventListeners: {
        featurehighlighted: handler_featurehighlighted,
        featureunhighlighted: handler_featureunhighlighted


share|improve this answer

OpenGeo has a workshop on Introduction to Openlayes in which a section about Integration with Other Frameworks was introduced here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.