angular-google-maps中的disableAutoPan无效

时间:2015-05-05 09:39:52

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

我目前在我的项目中使用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>

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

有没有人对此有任何建议?我做错了吗?

希望收到你的来信

问候

迈克尔

1 个答案:

答案 0 :(得分:0)

听起来像Angular Google Maps的错误。我确认使用:

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

效果很好。