I need to draw polygon on google maps using the hard coded values.I have used ngMap ( https://ngmap.github.io/ )and used drawing manager of ngMap to it, because i also want the user to draw polygon dynamically. if i use drawing manager,i am not able to draw polygon with hardcoded values. and also another thing , if the user put the marker on map. i need to get the co-ordinates of it. (for example:get the co-ordinates in alert box or console). can anyone please help me
Plunker here: http://plnkr.co/edit/keRsKthRAwX89WOWeYwZ?p=preview
<ng-map zoom="12" center="28.623457, 77.196452"
map-type-id="ROADMAP"
street-view-control-options="{position: 'LEFT_CENTER'}">
<drawing-manager
on-overlaycomplete="vm.onMapOverlayCompleted()"
drawing-control-options="{position: 'TOP_CENTER',drawingModes:['polygon','marker']}"
drawingControl="true"
drawingMode="null"
rectangleOptions="{fillColor:'red'}"
circleOptions="{fillColor: '#FFFF00',fillOpacity: 1,strokeWeight: 5,clickable: false,zIndex: 1,editable: true}" >
</drawing-manager>
1. How to draw a polygon
To display a polygon use a
shape
directive withname
attribute set topolygon
:2. How to get a marker position via Google Maps Drawing Manager
Modified example
Plunker