大家好,我试图增加用户从单击获得纬度和经度并在字段中获得纬度和经度的可能性:这是我的html部分:
<div class="col-sm-4">
<div class=" panel panel-primary" style="background-color: darkgray;" >
<div class="panel-heading">Position :</div>
<div class="panel-body">
<div class="form-group">
<label class="control-label">Adresse :</label>
<input type="text" class="form-control" [(ngModel)]="pan.adresse"/>
</div>
<div class="form-group">
<label class="control-label">Latitude</label>
<input type="text" class="form-control" [(ngModel)]="pan.latitude"/>
</div>
<div class="form-group">
<label class="control-label">Longitude :</label>
<input type="text" class="form-control" [(ngModel)]="pan.longitude"/>
</div>
<div class="form-group">
<label class="control-label">Etat :</label>
<input type="text" class="form-control" [(ngModel)]="pan.etat"/>
</div>
</div></div>
</div>
<div class="col-sm-8">
<div class=" panel panel-primary" >
<div class="panel-heading">Map :</div>
<div class="panel-body">
<agm-map [latitude]="36.718241" [longitude]="3.091969" [zoom]="6">
</agm-map>
</div></div>
</div>
所以我有地图和与纬度和经度有关的输入,而不是写我想通过单击地图来替换的信息,字段将自动填满 谢谢大家。