Skip to content

Instantly share code, notes, and snippets.

@akshay-3apr
Last active August 29, 2015 14:14
Show Gist options
  • Save akshay-3apr/e2a90e3ab0497c37e3b8 to your computer and use it in GitHub Desktop.
Save akshay-3apr/e2a90e3ab0497c37e3b8 to your computer and use it in GitHub Desktop.
designer
<link href="../core-scaffold/core-scaffold.html" rel="import">
<link href="../core-header-panel/core-header-panel.html" rel="import">
<link href="../core-menu/core-menu.html" rel="import">
<link href="../core-item/core-item.html" rel="import">
<link href="../core-icon-button/core-icon-button.html" rel="import">
<link href="../core-toolbar/core-toolbar.html" rel="import">
<link href="../core-field/core-field.html" rel="import">
<link href="../core-icon/core-icon.html" rel="import">
<link href="../core-input/core-input.html" rel="import">
<link href="../core-icons/core-icons.html" rel="import">
<link href="../speech-mic/speech-mic.html" rel="import">
<link href="../core-menu/core-submenu.html" rel="import">
<link href="../google-map/google-map.html" rel="import">
<link href="../google-map/google-map-search.html" rel="import">
<polymer-element name="my-element">
<template>
<style>
#design_host {
left: 0px;
top: 0px;
width: 100%;
height: 100%;
position: absolute;
box-sizing: border-box;
}
#core_scroll_header_panel {
left: 1070px;
top: 550px;
width: 380px;
height: 460px;
}
#core_scaffold {
left: 0px;
top: 0px;
width: 100%;
height: 100%;
right: 0px;
bottom: 0px;
position: absolute;
}
#core_header_panel {
background-color: rgb(255, 255, 255);
}
#core_toolbar {
color: rgb(255, 255, 255);
background-color: rgb(79, 125, 201);
}
#core_menu {
font-size: 16px;
}
#google_map {
left: 0px;
top: 0px;
width: 100%;
height: 100%;
display: block;
position: absolute;
}
#core_field {
left: 0px;
top: 20%;
width: 200px;
height: 40px;
position: absolute;
}
#core_field1 {
left: -2px;
top: 20px;
position: absolute;
}
#core_field2 {
left: 148px;
top: 10px;
position: absolute;
}
#core_input {
width: 200px;
height: 40px;
background-color: rgb(255, 255, 255);
}
#speech_mic {
display: none;
}
#input {
height: 80%;
background-color: rgb(255, 255, 255);
}
</style>
<core-scaffold id="core_scaffold">
<core-header-panel mode="seamed" id="core_header_panel" flex navigation>
<core-toolbar id="core_toolbar">
<core-field id="core_field" layout horizontal center icon="search" theme="core-light-theme">
<core-icon icon="search" id="core_icon"></core-icon>
<input id="input" placeholder="Search" flex>
<speech-mic id="speech_mic1"></speech-mic>
</core-field>
</core-toolbar>
<core-menu selected="RoadMap" valueattr="label" selectedindex="0" id="core_menu" theme="core-light-theme">
<core-item id="core_item" layout horizontal center label="RoadMap" icon="settings" on-tap="{{ showRoad }}" active></core-item>
<core-item id="core_item1" layout horizontal center label="SatelliteMap" icon="settings" on-tap="{{ showSat }}"></core-item>
</core-menu>
</core-header-panel>
<div id="div" tool>Google Maps</div>
<google-map latitude="{{ $.google_map_search.result.latitude }}" longitude="{{ $.google_map_search.result.longitude }}" zoom="18" id="google_map"></google-map>
<google-map-search map="{{ $.google_map.map }}" query="{{ $.input.value }}" id="google_map_search"></google-map-search>
</core-scaffold>
</template>
<script>
Polymer({
showRoad: function(){
this.$.google_map.mapType='roadmap';
},
showSat: function(){
this.$.google_map.mapType='satellite';
},
map: null
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment