How to draw a polygon using angular-google-maps in mvc5 How to draw a polygon using angular-google-maps in mvc5 angularjs angularjs

How to draw a polygon using angular-google-maps in mvc5


I think that you should step back and look for what you really want to achieve.If you want to learn angular, google maps, or both, I think you're not in the right path.First of all, the library you are using is no longer maintained by their creators. Even they recommend to use alternate options available:

Project not longer maintained

For the two options they show I will recommend the 2nd one: angular-google-maps

This library is to be used with Angular2. If you are looking to learn new technologies you should aim to tech on the raise. Angularjs, though is a really good library widely used, is the predecessor of Angular2 and it will be less popular as times goes by.

Having said that; I noticed that you didn't declared any markers or locations in your map. So, no data is set to show in your map. That's why you only see an empty map.

$scope.markers = [];$scope.locations = [];

I suggest you better try to understand the logic of the code you're trying to implement prior to try it and make it work out of the sky.