Skip to content

Instantly share code, notes, and snippets.

@keyz182
Last active July 12, 2016 20:27
Show Gist options
  • Save keyz182/a660e92e377e3962362c31fe4c7ff88d to your computer and use it in GitHub Desktop.
Save keyz182/a660e92e377e3962362c31fe4c7ff88d 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">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../google-map/google-map-search.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<template is="dom-bind">
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
left: 0px;
top: 0px;
}
#core_header_panel {
width: 100%;
height: 100%;
left: 0px;
top: 0px;
position: absolute;
}
#core_toolbar {
color: rgb(255, 255, 255);
background-color: rgb(79, 125, 201);
}
#section {
height: 1000px;
background: linear-gradient(rgb(214, 227, 231), lightblue);
}
#google_map {
width: 100%;
height: 100%;
display: block;
left: 0px;
top: 0px;
position: absolute;
}
#google_map_search {
left: 0px;
top: 0px;
position: absolute;
}
#google_map2 {
width: 400px;
height: 400px;
display: block;
left: 1670px;
top: 580px;
}
#google_map_directions1 {
left: 1520px;
top: 590px;
}
#paper_button {
position: relative;
}
paper-card {
position: absolute;
bottom: 25px;
left: 25px;
z-index: 1;
}
</style>
<core-header-panel mode="standard" id="core_header_panel">
<core-toolbar id="core_toolbar">
<paper-button id="paper_button">Set Position</paper-button>
</core-toolbar>
<section id="section">
<google-map-search map="[[map]]" query="{{search}}" results="{{results}}" id="google_map_search">
</google-map-search>
<google-map map="{{map}}" latitude="37.779"
longitude="-122.3892" id="google_map">
<template is="dom-repeat" items="{{results}}" as="marker">
<google-map-marker latitude="{{marker.latitude}}"
longitude="{{marker.longitude}}">
<h2>{{marker.name}}</h2>
<span>{{marker.formatted_address}}</span>
</google-map-marker>
</template>
</google-map>
<paper-card elevation="2"> <!-- elevation controls the amount of box shadow -->
<paper-icon-item>
<iron-icon icon="search" item-icon></iron-icon>
<paper-input label="Search" value="San Francisco" value="[[search]]" id="paper_input"></paper-input>
</paper-icon-item>
</paper-card>
</section>
</core-header-panel>
</template>
<script>
Polymer({
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment