This example demonstrates how you can customize the overviewmap control using its supported options as well as defining custom CSS. You can also rotate the map using the shift key to see how the overview map reacts.
-
-
overview, overviewmap
-
-
-
-
-
-
-
-
-
+---
+template: "example.html"
+title: "OverviewMap control example advanced"
+shortdesc: "Example of OverviewMap control with advanced customization."
+docs: >
+
This example demonstrates how you can customize the overviewmap control using its supported options as well as defining custom CSS. You can also rotate the map using the shift key to see how the overview map reacts.
-
-
-
-
-
-
-
+---
+template: "example.html"
+title: "OverviewMap control example"
+shortdesc: "Example of OverviewMap control."
+docs: >
+ This example demonstrates the use of the OverviewMap control.
+tags: "overview, overviewmap"
+---
+
-
-
-
-
-
-
-
+---
+template: "example.html"
+title: "Custom styles for polygons"
+shortdesc: "Showing the vertices of a polygon with a custom style geometry."
+docs: >
+ In this example two different styles are created for the polygons:
+ * The first style is for the polygons themselves.
+ * The second style is to draw the vertices of the polygons.
+tags: "polygon, vector, style, GeometryFunction"
+resources: polygon-styles.css
+---
+
+---
+template: "example.html"
+title: "Popup example"
+shortdesc: "Uses an overlay to create a popup."
+docs: >
+
+ 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 display the popup, and another listener is set as the click handler for the close button to hide the 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 display the popup, and another listener is set as the click handler for the close button to hide the popup.
-
The map on the left preloads low resolution tiles. The map on the right does not use any preloading. Try zooming out and panning to see the difference.
The map on the left preloads low resolution tiles. The map on the right does not use any preloading. Try zooming out and panning to see the difference.
Example of using the Select interaction. Choose between Single-click, Click and Hover as the event type for selection in the combobox below. When using Single-click or Click you can hold do Shift key to toggle the feature in the selection.
+---
+template: "example.html"
+title: "Select features example"
+shortdesc: "Example of using the Select interaction."
+docs: >
+ Choose between Single-click, Click and Hover as the event type for selection in the combobox below. When using Single-click or Click you can hold do Shift key to toggle the feature in the selection.
Note: when Single-click is used double-clicks won't select features. This in contrast to Click, where a double-click will both select the feature and zoom the map (because of the DoubleClickZoom interaction). Note that Single-click is less responsive than Click because of the delay it uses to detect double-clicks.
-
In this example, a listener is registered for the Select interaction's select event in order to update the selection status below.
-
-
-
-
-
-
-
-
+---
+template: "example.html"
+title: "Semi-transparent layer example"
+shortdesc: "Example of a map with a semi-transparent layer."
+docs: >
+ This example will display a tiled MaxBox layer semi-transparently over a MapQuest background.
+tags: "transparent, mapquest, tilejson"
+---
+
+---
+template: "example.html"
+title: "Side-by-side example"
+shortdesc: "The three maps, one WebGL, one Canvas, one DOM, share the same center, resolution, rotation and layers."
+docs: >
+ The three maps, one WebGL, one Canvas, one DOM, share the same center, resolution, rotation and layers.
+tags: "side-by-side, canvas, webgl, dom, canvas, sync, object"
+---
+
+
+
Canvas
+
+
+
+
WebGL
+
+
+ This map requires a browser that supports WebGL.
-
-
-
-
-
-
Canvas
-
-
-
-
WebGL
-
-
- This map requires a browser that supports WebGL.
-
-
-
-
DOM
-
-
-
-
-
-
-
-
Side-by-side example
-
The three maps, one WebGL, one Canvas, one DOM, share the same center, resolution, rotation and layers.
+---
+template: "example.html"
+title: "Snap interaction example"
+shortdesc: "Example of using the snap interaction together with draw and modify interactions."
+docs: >
+ Example of using the snap interaction together with
+ draw and modify interactions. The snap interaction must be added
+ last, as it needs to be the first to handle the
+ pointermove event.
+