Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Neogeografen/e78d7bd07ecef297d3b4f908fbaa8fd8 to your computer and use it in GitHub Desktop.
Save Neogeografen/e78d7bd07ecef297d3b4f908fbaa8fd8 to your computer and use it in GitHub Desktop.
Wiki template for MapillaryJS Viewer used at Ballerup Municipality Wiki
<noinclude>
[[Category:SeMaWi]]
Denne skabelon indlejerer et interaktivt Mapillary kort.
skabelonen anvendes på følgende vis:
<pre>
{{MapillaryBillede
| CLIENT_ID=
| IMAGE_ID=
}}
</pre>
=Parametre=
* CLIENT_ID: [[Mapillary]] API nøgle
* IMAGE_ID: [[Mapillary]] billede ID
</noinclude>
<includeonly>
{{#tag:html|
<style>
.mly-wrapper {
position: relative;
background-color: grey;
width: 640px;
height: 480px;
}
#mly, .mapillary-js {
position: relative;
height: 100%;
width: 100%;
}
</style>
<link href="https://npmcdn.com/mapillary-js@1.0.1/dist/mapillary-js.min.css" rel="stylesheet">
<script src="https://npmcdn.com/mapillary-js@1.0.1/dist/mapillary-js.min.js" type="text/javascript"></script>
<div class="mly-wrapper"><div id="mly"></div></div>
<script>
window.onload = function() {
var mly = new Mapillary.Viewer('mly', '{{{CLIENT_ID|}}}', '{{{IMAGE_ID|}}}')
}
</script>
}}
</includeonly>
@JosefAssad
Copy link

Bemærk, kræver $wgRawHtml = true; i LocalSettings.php.

@gyllen
Copy link

gyllen commented May 2, 2016

Nice, you guys should upgrade to 1.2.1 for faster mapillary-js performance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment