I want to draw a polygon in the Google maps based on the co-ordinates input in the input box.
After entering the set of co-ordinates in the input box, once I click on Draw polygon button, I would like to draw a polygon in the Google map(agm map).
I want to draw a polygon in the Google maps based on the co-ordinates input in the input box.
After entering the set of co-ordinates in the input box, once I click on Draw polygon button, I would like to draw a polygon in the Google map(agm map).
Instead of relying on a 3rd party library (AGM), you can actually just implement Google Maps API natively on Angular. This way, you can just follow the official documentation once you initialize Maps JS API. This should save you a lot of headache instead of following unpredictable 3rd party documentations.
Here is a sample code with your requirements: https://stackblitz.com/edit/angular-draw-polygon
You can also just see the code below:
index.html
mapComponent.html
mapComponent.ts
style.css