0
WikiTude增強現實JavaScript SDK有一個名爲markerList的標記數組。我想知道數組的結構是什麼(在文檔中沒有)。例如,我想知道如何訪問markerlist中geoObject的enabled屬性。Wikitude Javascript SDK中的MarkerList數組的結構
實施例,也可以是像,
World.markerList[i].enabled=false
什麼的markerlist陣列的結構和子結構?
我可以這樣做嗎?請幫忙。我真的被困在這裏。我不想每次更改自定義滑塊時重新加載並重新創建POIS。我希望地理對象啓用和停用,以防止閃爍。
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);
我該怎麼做?你能否提供一個例子? –
只需在Marker.js中定義一個修改地理對象啓用屬性的新函數(例如,將bool參數傳遞給該函數,然後用於修改啓用的屬性)。然後你可以在任何你想要的地方調用這個新的Marker函數。 –