In my project, I am utilizing the angularjs-google-maps directive for map functionality.
Below is a snippet of code demonstrating how markers are added to the map:
<map id="map" style="height:450px" zoom="4" zoom-to-include-markers='auto' center="{[{center.lat}]},{[{center.long}]}" on-center-changed="centerChanged()">
<marker id={[{$index}]} animation="DROP" ng-repeat="location in locations" position="{[{location.latitude}]},{[{location.longitude}]}" on-click="click()" title="Click to zoom"></marker>
</map>
My challenge now is how to select these markers from a javascript function. When selecting a marker by ID, it returns as a DOM element instead of a Google Maps marker object as illustrated below:
<marker id="1" animation="DROP" ng-repeat="location in locations" position="10.0050407,76.3459498" on-click="click()" title="Click to zoom" class="ng-scope"></marker>
Is there a way for me to access markers initialized through ng-repeat as Google Maps marker objects within JavaScript?