Created
November 3, 2019 16:29
-
-
Save timdeschryver/c33751c896980f63d6f4a1b8644bb070 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class AppComponent implements OnInit { | |
| addMarker() { | |
| this.markers.push({ | |
| position: { | |
| lat: this.center.lat + ((Math.random() - 0.5) * 2) / 10, | |
| lng: this.center.lng + ((Math.random() - 0.5) * 2) / 10, | |
| }, | |
| label: { | |
| color: 'red', | |
| text: 'Marker label ' + (this.markers.length + 1), | |
| }, | |
| title: 'Marker title ' + (this.markers.length + 1), | |
| options: { animation: google.maps.Animation.BOUNCE }, | |
| }) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment