[Question] How can I use custom html elements inside <agm-circle> directive?
See original GitHub issueI 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 <agm-circle> so using CSS, I can draw vertical and horizontal lines defining quadrants? Something like below image:
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 AGM@1.0.0-beta.5
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
[Question] How can I use custom html elements inside <agm ...
[Question] How can I use custom html elements inside <agm-circle> directive? #1638. Closed. faizansaiyed opened this issue on May 28, ...
Read more >Using custom elements - Web Components | MDN
Customized built-in elements inherit from basic HTML elements. To create one of these, you have to specify which element they extend (as ...
Read more >How to add html to a agm-marker in angular 2? - Stack Overflow
I don't know agm and angular, but with the standard tools Html/js you can do it relative simple. 1.) Get 2 coordinates from...
Read more >Custom Elements (V1) | Can I use... Support tables for HTML5 ...
Custom Elements (V1). - LS. One of the key features of the Web Components system, custom elements allow new HTML tags to be...
Read more >Creating a Custom Directive • Angular - codecraft.tv
We use Dependency Injection (DI) to inject the renderer into our directives constructor. 2, Instead of setting the background color directly via the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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:
and
With centerChange event, lines are getting updated, but not with radiusChange event:
Thanks again!