How to use javascript from Dart inside a polymer element

末鹿安然 提交于 2019-12-06 09:48:48

This is a CSS problem, maybe specific to Polymer, but a CSS problem all the same. There are several things you can do. The simplest one is to add fullbleed as an attribute to <body>.

<body unresolved fullbleed>

</body>

And your map will show up, taking up the rest of the space available. Or you can specify the height of your google-map-canvas element to have a height in pixels like so

<polymer-element ...>
    <template>
        <style>
            :host {
               height: 500px;
            }
            ...
        </style>
        ...
    </template>
</polymer-element>

And the map will fill the space left after the title you put just before it. But it will not go beyond the 500px that you gave the element. There are other tricks you could do. I'd look at this site for more ways to layout polymer elements

https://www.polymer-project.org/docs/polymer/layout-attrs.html

And a guide to style polymer elements

https://www.polymer-project.org/docs/polymer/styling.html

Hope that answers your questions.

By the way, you do know the is a port of Google maps API to Dart?

https://pub.dartlang.org/packages/google_maps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!