[Question] How can I use custom html elements inside <agm-circle> directive?
I have a requirement where I need to draw a circle (with lat/long and radius of the circle) with four equal quadrants, dividing the circle into four equal halves.
Is it possible to use custom HTML elements inside

Can I do something like this:
<agm-circle *ngFor="let circle of circles" [latitude]="circle.lat" [longitude]="circle.lng" [radius]="circle.radius"
[fillColor]="circle.color" [circleDraggable]="true" [editable]="true">
<div class="quadrants">
<div class="vertical"></div>
<div class="horizontal"></div>
</div>
</agm-circle>
Using Angular CLI 7 and [email protected]
why does it have to be inside the circle? you can have two polylines next to it in the DOM, with the coordinates inside the circle.
<ng-container *ngFor="let circle of circles" >
<agm-circle [latitude]="circle.lat" [longitude]="circle.lng" [radius]="circle.radius" [fillColor]="circle.color" [circleDraggable]="true" [editable]="true">
</agm-circle>
<agm-polyline>
<agm-polyline-point [latitude]="circle.lat" [longitude]="circle.lng - meterToLng(circle.radius/2, circle.lat)">
</agm-polyline-point>
<agm-polyline-point [latitude]="circle.lat" [longitude]="circle.lng + meterToLng(circle.radius/2, circle.lat)">
</agm-polyline-point>
</agm-polyline>
<agm-polyline>
<agm-polyline-point [latitude]="circle.lat - meterToLat(circle.radius/2, circle.lng)" [longitude]="circle.lng">
</agm-polyline-point>
<agm-polyline-point [latitude]="circle.lat + meterToLat(circle.radius/2, circle.lng)" [longitude]="circle.lng">
</agm-polyline-point>
</agm-polyline>
</ng-container>
Can you please also provide meterToLat/Lng functions also? I cant find proper one.
https://gis.stackexchange.com/a/2964/90193
Can understand what to calculate with the parameters you passed in your first answer and calculation provided in your second answer URL. Can you please specify exactly how to calculate?
Now poly-lines are generated but they are going out of the circle:

Here is the calculation what I did from the answer given on StackEx:
meterToLng(val1: number, val2: number): number {
return ((val1 * 100) / 111111) * Math.cos(val2);
}
meterToLat(val1: number, val2: number): number {
return ((val1 * 100) / 111111) * Math.cos(val2);
}
try
meterToLng(radius: number, lat: number): number {
return ((radius) / 111111) *Math.cos(lat);
}
meterToLat(radius: number): number {
return ((radius) / 111111);
}
@doom777 This is not working. Following is the o/p:

Ok, this time I tested and it works.
Basically two mistakes were that Math.cos accepts radians, not degrees, and the entire radius length should be the start of the line, and not half.
meterToLng(radius: number, lat: number): number {
return radius /( 111111 * Math.cos(lat * Math.PI / 180));
}
meterToLat(radius: number): number {
return radius / 111111;
}
<ng-container *ngFor="let circle of circles" >
<agm-circle [latitude]="circle.lat" [longitude]="circle.lng" [radius]="circle.radius" [fillColor]="circle.color" [circleDraggable]="true" [editable]="true">
</agm-circle>
<agm-polyline>
<agm-polyline-point [latitude]="circle.lat" [longitude]="circle.lng - meterToLng(circle.radius, circle.lat)">
</agm-polyline-point>
<agm-polyline-point [latitude]="circle.lat" [longitude]="circle.lng + meterToLng(circle.radius, circle.lat)">
</agm-polyline-point>
</agm-polyline>
<agm-polyline>
<agm-polyline-point [latitude]="circle.lat - meterToLat(circle.radius, circle.lng)" [longitude]="circle.lng">
</agm-polyline-point>
<agm-polyline-point [latitude]="circle.lat + meterToLat(circle.radius, circle.lng)" [longitude]="circle.lng">
</agm-polyline-point>
</agm-polyline>
</ng-container>

Thanks a lot, savior! One more little help? My circle is editable, so if I change the radius of the circle, it should update the polylines. How can I do that? Currently, polylines do not update if I update radius, but if I change the center point, it works well.
I did this:
<agm-circle [latitude]="circle.lat" [longitude]="circle.lng" [radius]="circle.radius" [fillColor]="circle.color" circleDraggable]="false" [editable]="true" (radiusChange)="updateCircle($event, i)" (centerChange)="updateQuadrants($event, i)"></agm-circle>
and
updateQuadrants(event, index) {
this.circles[index].lat = event.lat;
this.circles[index].lng = event.lng;
}
updateCircle(event, index) {
this.circles[index].radius = event;
}
With centerChange event, lines are getting updated, but not with radiusChange event:

Thanks again!