簡體   English   中英

Wikitude Javascript SDK中MarkerList數組的結構

[英]Structure of MarkerList array in Wikitude Javascript SDK

WikiTude增強現實JavaScript SDK具有一個名為markerList的標記數組。 我想知道數組的結構是什么(在文檔中沒有)。 例如,我想知道如何訪問標記列表中的geoObject的enabled屬性。

舉個例子,

World.markerList[i].enabled=false

標記列表數組的結構和子結構是什么?

我可以喜歡以下內容嗎? 請幫忙。 我真的被困在這里。 我不想每次更改自定義滑塊時都重新加載並重新創建POIS。 我希望激活和禁用GeoOjects,以防止閃爍。

marker.js

// Labels and properties described here.

this.markerObject = new AR.GeoObject(markerLocation, {
        drawables: {
            cam: [this.markerDrawable_idle,this.markerDrawable_selected,this.titleLabel,this.distanceUpdate,this.descriptionLabel],
             enabled : true,
            indicator: this.directionIndicatorDrawable,
            radar: this.radardrawables
        }
    });

    this.markerObject.changeVisibilitysetter= function(markerObject) {


    this.markerObject.enabled = false;

}

然后從fromwebservice調用函數

World.changeVisibilitysetter(marerList[i].markerObject);

數組中的元素類型為“標記”。 這樣的標記沒有啟用的屬性。 您需要使用這樣的setter擴展類,並在實現中訪問基礎的AR.GeoObject並更改其enabled屬性。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM