Javascript 两个网络组件之间的绑定:谷歌地图&x2B;地理定位
我尝试使用webcomponent google map和组件地理位置,如上的第三个示例: HTML:Javascript 两个网络组件之间的绑定:谷歌地图&x2B;地理定位,javascript,google-maps,polymer,web-component,Javascript,Google Maps,Polymer,Web Component,我尝试使用webcomponent google map和组件地理位置,如上的第三个示例: HTML: <geo-location latitude="{{lat}}" longitude="{{lng}}"></geo-location> <google-map latitude="{{lat}}" longitude="{{lng}}" showcentermarker></google-map> <google-map fit=""
<geo-location latitude="{{lat}}" longitude="{{lng}}"></geo-location>
<google-map latitude="{{lat}}" longitude="{{lng}}" showcentermarker></google-map>
<google-map fit="" showcentermarker="" latitude="{{lat}}" longitude="{{lng}}"></google-map>
<geo-location latitude="13" longitude="-73.57572912" watchpos=""></geo-location>
但我的问题是,googlemap组件的{{lat}}和{{lng}}值永远不会在运行时更新
运行时:
<geo-location latitude="{{lat}}" longitude="{{lng}}"></geo-location>
<google-map latitude="{{lat}}" longitude="{{lng}}" showcentermarker></google-map>
<google-map fit="" showcentermarker="" latitude="{{lat}}" longitude="{{lng}}"></google-map>
<geo-location latitude="13" longitude="-73.57572912" watchpos=""></geo-location>
我怀疑您正在使用以下元素:
<body>
<geo-location ...></geo-location>
<google-map ...></google-map>
</body>
有关这方面的更多信息,请参阅文档中的章节