
<ya-map ya-zoom="8" ya-center="[37.64,55.76]"></ya-map> ya-center attribute, the map center will be set to the current location of the user. <ya-map ya-zoom="10" ya-center="[37.64,55.76]"> <ya-geo-object ya-source="geoObject"></ya-geo-object> </ya-map> $scope.geoObjects= { geometry: { type: 'Circle', coordinates: [37.60,55.76], radius: 10000 }, properties: { balloonContent: " - 10 ", hintContent: " " } }; <ya-map ya-zoom="10" ya-center="[37.64,55.76]"> <ya-collection> <ya-geo-object ya-source="geoObject"></ya-geo-object> <ya-collection> </ya-map> <ya-map ya-zoom="10" ya-center="[37.64,55.76]"> <ya-cluster> <ya-geo-object ya-source="geoObject"></ya-geo-object> <ya-cluster> </ya-map> geoObject should now point to a point.ya-event[-target]-eventname . Here, ya-event is a prefix that determines whether this is a subscription to an event, target — if specified, the property inside the element for which we want to subscribe, eventname — the name of the event to which we subscribe. The event handler is passed the native object of the Yandex map events via the $event parameter. You can get the object that fired the event through $event.get('target') . So, let's subscribe to the click event of the map and the add event of the geoObjects map geoObjects . <ya-map ya-zoom="10" ya-event-click="click($event)" ya-event-geo-objects-add="added($event)"></ya-map> $scope.click = function(e){ //- }; $scope.added=function(e){ //- }; yaToolbar directive, and if you want to create your own panel (well, or upgrade the existing one), then yaControl directives are placed inside it. Example: <ya-map ya-zoom="8" ya-center="[37.64,55.76]"> <!-- --> <ya-toolbar ya-name="zoomControl"></ya-toolbar> <!-- --> <ya-toolbar ya-name="toolBar"> <ya-control ya-type="button" ya-params=": balloonHeader" ya-event-select="balloonHeader($event)" ya-event-deselect="balloonHeader($event)"></ya-control> </ya-toolbar> </ya-map> Source: https://habr.com/ru/post/199290/
All Articles