UNPKG

775 BHTMLView Raw
1---
2layout: example.html
3title: Permalink
4shortdesc: Example on how to create permalinks.
5docs: >
6 In this example the <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history"
7 target="_blank">HTML 5 History API</a> is used to update the browser URL
8 with the current zoom-level, center and rotation when the map is moved.
9 Note that the History API is not supported in <a href="http://caniuse.com/#feat=history"
10 target="_blank">all browsers</a>, one might consider to use a <a
11 href="https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills#html5-history-api-pushstate-replacestate-popstate"
12 target="_blank">a polyfill</a>.
13tags: "permalink, openstreetmap, history"
14---
15<div id="map" class="map"></div>