OpenLayers 3 Pop-up?

In OpenLayers 2 I was using the OpenLayers.Popup.FramedCloud object. Under OpenLayers 3, this object is apparently gone, so I have replicated the functionality using an overlay. One feature of the older style popup that I haven't been able to replicate however is the automatic positioning. That is, under OpenLayers 2 it would change where the pop-up opened relative to the map point depending on where it had the most room. So it might be above, below, to the right, or to the left of the point. How can I replicate this functionality in OpenLayers 3?

Answers


Not exactly what you are asking for, but ol.Overlay takes an option autoPan which will pan the map so that the popup is visible.

  var overlay = new ol.Overlay({
    ...
    autoPan: true,
    autoPanAnimation: {
      duration: 250
    }
  });

http://openlayers.org/en/master/examples/popup.html


Need Your Help

How can I trace RIA service messages

.net wcf wcf-ria-services

Is there a way to see the messages that RIA services/clients send?