HTML:
<ya-map ya-zoom="9" ya-center="[41.8,47.6]"> <ya-geo-object ya-source="point" ya-options="{preset: 'islands#redStretchyIcon'}" ya-event-contextmenu="contextmenu($event)"></ya-geo-object> </ya-map> <div id="menu" ng-show="params.show" ng-style="params.position"> <ul id="menu_list"> <li>Название: <br /> <input ng-model="point.properties.iconContent" type="text" name="icon_text" /></li> <li>Подсказка: <br /> <input ng-model="point.properties.hintContent" type="text" name="hint_text" /></li> <li>Балун: <br /> <input ng-model="point.properties.balloonContent" type="text" name="balloon_text" /></li> </ul> <div align="center"><input ng-click="params.show=false" type="button" value="Закрыть" /></div> </div>
javascript:
$scope.point = { geometry:{ type:'Point', coordinates:[42.1, 47.6] }, properties: { iconContent:'Щелкни по мне правой кнопкой мыши!', hintContent: "", balloonContent: "" } }; $scope.params={position:{}}; $scope.contextmenu=function(e){ $scope.params.position.left = e.get('pagePixels')[0]+'px'; $scope.params.position.top = e.get('pagePixels')[1]+'px'; $scope.params.show=!$scope.params.show; };