Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
250 changes: 250 additions & 0 deletions apply-shim.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 68 additions & 0 deletions demo/polymer3/building.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">

<title>mapbox-gl demo</title>

<script src="https://unpkg.com/@webcomponents/webcomponentsjs@^2.0.0/webcomponents-loader.js"></script>

<script type="module">
import '@polymer/iron-demo-helpers/demo-pages-shared-styles.js'; import '@polymer/iron-demo-helpers/demo-snippet.js'; import {} from '@polymer/polymer/lib/elements/dom-bind.js'; import "../mapbox-gl.js"; import "../mapbox-building-layer.js";
</script>



<custom-style>
<style is="custom-style" include="demo-pages-shared-styles">

</style>
</custom-style>
</head>

<body>
<div class="vertical-section-container centered">
<h3>Basic mapbox-gl demo</h3>
<demo-snippet>
<template>
<style>
mapbox-gl {
height: 400px;
width: 100%;
}
</style>

<dom-bind>
<template>

<mapbox-gl
interactive
access-token="[[key]]"
map="{{map}}"
latitude=40.7135
longitude=-74.0066
zoom=15
pitch=45></mapbox-gl>

<mapbox-building-layer
map="[[map]]"
layer-id="3dbuilding"
fill-extrusion-opacity=0.6
fill-extrusion-color="#666"></mapbox-building-layer>

</template>
</dom-bind>

<script>
var autobind = document.querySelector('dom-bind');
// please use your own mapbox key!!!
autobind.key = 'pk.eyJ1IjoiZXRlcm5hMiIsImEiOiJjaXppZjRoaTIwMmYxMndsNHJ4dzR1eWJsIn0.MvJ5fsV47RHlSAt2fBEKLg';
</script>
</template>
</demo-snippet>
</div>
</body>

</html>
42 changes: 42 additions & 0 deletions demo/polymer3/centered.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">

<title>mapbox-gl demo</title>

<script src="https://unpkg.com/@webcomponents/webcomponentsjs@^2.0.0/webcomponents-loader.js"></script>
<script type="module">
import '@polymer/iron-flex-layout/iron-flex-layout-classes.js'; import {} from '@polymer/polymer/lib/elements/dom-bind.js'; import "../mapbox-gl.js"; import "../mapbox-layer.js"; import "../geojson-source.js";

</script>

<custom-style>
<style is="custom-style" include="iron-flex iron-flex-alignment">
body {
width: 100vw;
height: 100vh;
box-sizing: border-box;
margin: 0px;
padding: 0px;
background-color: #444;
}

mapbox-gl {
width: 80vw;
height: 80vh;
}
</style>
</custom-style>
</head>

<body class="layout vertical center center-justified">

<mapbox-gl interactive access-token="pk.eyJ1IjoiZXRlcm5hMiIsImEiOiJjaXppZjRoaTIwMmYxMndsNHJ4dzR1eWJsIn0.MvJ5fsV47RHlSAt2fBEKLg"></mapbox-gl>


</body>

</html>
Loading