Add permalink example

This commit is contained in:
tsauerwein
2015-04-14 22:03:47 +02:00
committed by tsauerwein
parent ed76bdb095
commit b8ec2e28b5
2 changed files with 99 additions and 0 deletions

19
examples/permalink.html Normal file
View File

@@ -0,0 +1,19 @@
---
template: example.html
title: Permalink example
shortdesc: Example on how to create permalinks.
docs: >
In this example the <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history"
target="_blank">HTML 5 History API</a> is used to update the browser URL
with the current zoom-level, center and rotation when the map is moved.
Note that the History API is not supported in <a href="http://caniuse.com/#feat=history"
target="_blank">all browsers</a>, one might consider to use a <a
href="https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills#html5-history-api-pushstate-replacestate-popstate"
target="_blank">a polyfill</a>.
tags: "permalink, openstreetmap, history"
---
<div class="row-fluid">
<div class="span12">
<div id="map" class="map"></div>
</div>
</div>