File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1919 < p > < label > Latitude:</ label > {{display?.lat}}</ p >
2020 < p > < label > Longitude:</ label > {{display?.lng}}</ p >
2121
22- < button (click) ="displayPolyline() "> Polyline</ button >
23- < button (click) ="editablePolyline() "> Editable Polyline</ button >
22+ < div >
23+ < label for ="polyline-checkbox "> Toggle Polyline</ label >
24+ < input id ="polyline-checkbox " type ="checkbox " (click) ="togglePolylineDisplay() ">
25+ </ div >
26+ < div >
27+ < label for ="editable-polyline-checkbox "> Toggle Editable Polyline</ label >
28+ < input id ="editable-polyline-checkbox " type ="checkbox " (click) ="toggleEditablePolyline() ">
29+ </ div >
30+
2431</ div >
Original file line number Diff line number Diff line change @@ -46,11 +46,11 @@ export class GoogleMapDemo {
4646 this . markerPositions . pop ( ) ;
4747 }
4848
49- displayPolyline ( ) {
49+ togglePolylineDisplay ( ) {
5050 this . isPolylineDisplayed = ! this . isPolylineDisplayed ;
5151 }
5252
53- editablePolyline ( ) {
54- this . polylineOptions = { ...this . polylineOptions , editable : true } ;
53+ toggleEditablePolyline ( ) {
54+ this . polylineOptions = { ...this . polylineOptions , editable : ! this . polylineOptions . editable } ;
5555 }
5656}
You can’t perform that action at this time.
0 commit comments