【问题标题】:disableAutoPan in angular-google-maps not workingangular-google-maps 中的 disableAutoPan 不起作用
【发布时间】:2015-05-05 09:39:51
【问题描述】:

我目前在我的项目中使用 angular-google-maps v 2.1.0。 一切正常,但是当我使用带有窗口的标记时,单击时出现了 AutoPan 问题。地图滚动到位,但不应该。

在文档中有一个选项可以将 disableAutoPan 设置为 true。但它没有设置任何选项。

<ui-gmap-markers models="focusmarkers" coords="'self'" icon="'icon'">
    <ui-gmap-windows  show="show" options="{ disableAutoPan : true}">
        <div ng-non-bindable>{{content}}</div>
    </ui-gmap-windows>
</ui-gmap-markers>

即使是最大宽度或任何其他选项也不会对窗口产生任何影响。

有人对此有什么建议吗?我做错什么了吗?

希望收到您的来信

问候

迈克尔

【问题讨论】:

标签: angularjs google-maps angular-google-maps


【解决方案1】:

听起来像是 Angular 谷歌地图的一个错误。我确认使用:

new google.maps.InfoWindow({
    disableAutoPan: true
});

效果很好。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-04-10
    • 1970-01-01
    • 1970-01-01
    • 2021-10-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多