HTML:
<ya-map ya-zoom="10" ya-center="[37.75,55.73]"> <ya-collection ya-options="{preset: 'islands#yellowIcon'}"> <ya-geo-object ng-repeat="o in oneObjects" ya-source="o"></ya-geo-object> </ya-collection> <ya-collection ya-options="{preset: 'islands#blueIcon'}"> <ya-geo-object ng-repeat="o in twoObjects" ya-source="o"></ya-geo-object> </ya-collection> </ya-map>
javascript:
$scope.oneObjects = [ { geometry: { type: 'Point', coordinates: [37.75, 55.73] } }, { geometry: { type: 'Point', coordinates: [37.75, 55.81] } } ]; $scope.twoObjects=[ { geometry: { type: 'Point', coordinates: [37.65, 55.73] } }, { geometry: { type: 'Point', coordinates: [37.65,55.81] } } ];