diff --git a/examples/popup.html b/examples/popup.html new file mode 100644 index 0000000000..74c215e656 --- /dev/null +++ b/examples/popup.html @@ -0,0 +1,110 @@ + + +
+ + + + + + + + +Uses an overlay to create a popup.
+
+ Click on the map to get a popup. The popup is composed of a few basic elements: a container, a close button, and a place for the content. To anchor the popup to the map, an ol.Overlay is created with the popup container. A listener is registered for the map's click event to render the popup, and another listener is set as the click handler for the close button to hide the popup.
+
+ See the popup.js source to see how this is done. +
+You clicked here:
' + hdms +
+ '';
+ container.style.display = 'block';
+
+});