Skip to content

Instantly share code, notes, and snippets.

@olayinkasf
Last active August 29, 2015 14:15
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 olayinkasf/d48a8f25ba0780019a64 to your computer and use it in GitHub Desktop.
Save olayinkasf/d48a8f25ba0780019a64 to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
}
#core_header_panel {
width: 25%;
height: 100%;
left: 0px;
top: 0px;
position: absolute;
}
#section {
height: 1000px;
background: linear-gradient(rgb(214, 227, 231), rgb(173, 216, 230));
}
#map {
width: 75%;
height: 100%;
left: 25%;
top: 0px;
position: absolute;
}
</style>
<core-header-panel mode="standard" id="core_header_panel">
<section id="section"></section>
</core-header-panel>
<div id="map"></div>
</template>
<script src="http://openlayers.org/api/OpenLayers.js"></script>
<script>
Polymer('my-element',{
ready: function(){
// Create the map using the specified DOM element
var map = new OpenLayers.Map("map");
map.addControl(new OpenLayers.Control.PanZoomBar());
var layer = new OpenLayers.Layer.OSM("OpenStreetMap");
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0, 0), 2);
console.log("fuck!!!");
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment