0
私はangular2 google mapを使用しています。私はマウスの情報ウィンドウを開き、マーカーのmouseleaveを閉じる必要があります。 http://embed.plnkr.co/YX7W20/angular2 google map markerマウスenterとleaveのイベント
<!DOCTYPE html>
<html>
<head>
<title>Angular 2 QuickStart</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 1. Load libraries -->
<!-- Polyfill(s) for older browsers -->
<script src="https://npmcdn.com/[email protected]/es6-shim.min.js"></script>
<script src="https://npmcdn.com/[email protected]?main=browser"></script>
<script src="https://npmcdn.com/[email protected]"></script>
<script src="https://npmcdn.com/[email protected]/dist/system.src.js"></script>
<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>
<!-- 3. Display the application -->
<body>
<my-app>Loading...</my-app>
</body>
</html>
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->
お返事ありがとうございました。 plunkrでうまく動作していますが、私のシステムでエラーが発生しています プロパティ '_addEventListeners'はプライベートであり、 'SebmGoogleMapMarker'クラス内でのみアクセス可能です これはanguar2-goolge-mapバージョンに関連していますか?私は "angular2-google-maps"を使っています: "0.12.0"。 –
SebmGoogleMapMarker.d.tsの_addEventListeners()はprivateとして宣言されています。したがって、上記のコードをGoogleマップ0.12.0に書き込む方法はありません。 –
私はコードを更新しました。あなたはそれを試すことができます。 – yurzui