new Popup(options)
Parameters:
| Name | Type | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| options | Extend Overlay options Properties
 | 
Example
var popup = new ol.Overlay.Popup(); map.addOverlay(popup); popup.show(coordinate, "Hello!"); popup.hide();
Extends
Methods
- 
    addPopupClass(c)
- 
    
    Add a CSS class to the popup. Parameters:Name Type Description cstring class name. 
- 
    getVisible()
- 
    
    Check if popup is visible Returns:- Type
- boolean
 
- 
    hide()
- 
    
    Hide the popup 
- 
    removePopupClass(c)
- 
    
    Remove a CSS class to the popup. Parameters:Name Type Description cstring class name. 
- 
    setClosebox(b)
- 
    
    Set a close box to the popup. Parameters:Name Type Description bbool 
- 
    setPopupClass(c)
- 
    
    Set the CSS class of the popup. Parameters:Name Type Description cstring class name. 
- 
    setPositioning(pos)
- 
    
    Set positionning of the popup Parameters:Name Type Description posol.OverlayPositioning | string | undefined an ol.OverlayPositioning or 'auto' to var the popup choose the best position 
- 
    show(coordinate, html)
- 
    
    Set the position and the content of the popup. Parameters:Name Type Description coordinateol.Coordinate | string the coordinate of the popup or the HTML content. htmlstring | undefined the HTML content (undefined = previous content). Examplevar popup = new ol.Overlay.Popup(); // Show popup popup.show([166000, 5992000], "Hello world!"); // Move popup at coord with the same info popup.show([167000, 5990000]); // set new info popup.show("New informations");
 ol-ext
ol-ext