---
layout: example.html
title: Custom map element
shortdesc: Example of a custom element with a map.
docs: >
The example creates and registers a custom element, `ol-map`, which contains a simple map. **Note:** Only works in browsers that supports `ShadowRoot`.
tags: "es2015, web-component, custom-element, shadow-dom"
---