Skip to content

Instantly share code, notes, and snippets.

@ooscarr
Last active August 29, 2015 14:22
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 ooscarr/8dea9aecd94e97be18f3 to your computer and use it in GitHub Desktop.
Save ooscarr/8dea9aecd94e97be18f3 to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<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-menu/core-submenu.html">
<link rel="import" href="../core-ajax/core-ajax.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
top: 0px;
left: 0px;
}
#core_scaffold {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
width: 100%;
height: 100%;
background-color: rgb(103, 58, 183);
}
#core_header_panel {
background-color: rgb(255, 255, 255);
}
#core_toolbar {
background-color: rgb(103, 58, 183);
color: rgb(255, 255, 255);
}
#core_menu {
font-size: 16px;
}
#google_map {
width: 100%;
height: 100%;
display: block;
left: 0px;
top: 0px;
position: absolute;
}
#core_ajax {
left: 0px;
top: 0px;
position: absolute;
width: 210px;
height: 160px;
}
</style>
<core-scaffold id="core_scaffold">
<core-header-panel mode="seamed" id="core_header_panel" navigation flex>
<core-toolbar id="core_toolbar" horizontal layout center-justified>
<img alt="Wantedpet" height="22" hspace="0" vspace="0" width="81" complete naturalheight="0" naturalwidth="0" x="87" y="21" id="img"></img>
</core-toolbar>
<core-menu selected="Item2" valueattr="label" selectedindex="1" id="core_menu" theme="core-light-theme">
<core-item id="core_item" icon="map" label="Mascotas Perdidas" horizontal center layout></core-item>
<core-item id="core_item1" icon="settings" label="Item2" horizontal center layout active></core-item>
</core-menu>
</core-header-panel>
<div id="div" tool>Mascotas Perdidas</div>
<core-ajax url="//wantedpet.herokuapp.com/ws/lost/" auto params='{"alt":"json", "q":"polymer"}' loading handle-as="json" last-response hidden></core-ajax>
<google-map latitude="-20.2448162" longitude="-70.1388493" zoom="3" id="google_map" disable-default-ui show-center-marker>
<template is="dom-repeat" items></template>
</google-map>
<script text="
var map = document.querySelector('google-map');
map.latitude = -20.2448162;
map.longitude = -70.1388493;
map.addEventListener('google-map-ready', function(e) {
alert('Map loaded!');
});
" async>
var map = document.querySelector('google-map');
map.latitude = -20.2448162;
map.longitude = -70.1388493;
map.addEventListener('google-map-ready', function(e) {
alert('Map loaded!');
});
</script>
<core-ajax url="https://wantedpet.herokuapp.com/ws/lost" handleas="json" auto params="{{ $.google_map.location }}" method="GET" id="core_ajax" hidden>hola</core-ajax>
</core-scaffold>
</template>
<script>
Polymer({
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment