Pannellumを使ってパノラマビューアを構築しました。ここでデフォルトの設定にオプションを渡して、そういうビューを生成します。jsonのオブジェクトに動的な値を割り当てます。
var panoOptionDefaults = {
type: "equirectangular",
haov: imageXRes,
vaov :imageYRes,
minPitch : 0,
maxPitch : 0,
minYaw : (imageYRes * 2) * -1,
maxYaw : (imageYRes * 2),
autoLoad : true,
mouseZoom : false,
showControls : false,
hfov:imageXRes * 2, // Zoom - positive number zooms out/negative number zooms in
panorama: $scope.currentProfile.panorama.image, //value in json, returns error
hotSpotDebug : false,
hotSpots: [ // Dynamic Value
{
"pitch": -9.0,
"yaw": -1.0,
"cssClass": "custom-hotspot",
"createTooltipFunc": hotspot,
"createTooltipArgs": "Radios for Communication"
}
]
}
私がしようとしているのは、「panaroma」の価値を私のresponse.dataから得ることです。メソッドを取得します。私は既に属性に基づいてprofile.jsonを返し、ここに個々のデータを持つ各指令に対してこのjson結果を返すgetメソッドを返す動作する角度サービスを作成しました。
$scope.currentProfile = {};//creates object
profiles.getProfile().then(function(response){
$scope.currentProfile = response.data; //returns data and assigns to $scope
});
あなたはresponse.dataからいくつかの値を取得したいですか? – Sajeetharan
@Sajeetharan、はい私は – Brendan
あなたの質問は明確ではない – Sajeetharan