简体   繁体   English

Wikitude Javascript SDK中MarkerList数组的结构

[英]Structure of MarkerList array in Wikitude Javascript SDK

WikiTude Augmented reality JavaScript SDK has an array of markers named markerList. WikiTude增强现实JavaScript SDK具有一个名为markerList的标记数组。 I want to know what is the structure of the array (It is no in the documentation). 我想知道数组的结构是什么(在文档中没有)。 For example, I want to know how to access the enabled property of a geoObject in markerlist. 例如,我想知道如何访问标记列表中的geoObject的enabled属性。

Example, can it be like, 举个例子,

World.markerList[i].enabled=false

What the the structure and sub-structures of the markerlist array? 标记列表数组的结构和子结构是什么?

Can I do like the following. 我可以喜欢以下内容吗? Please help. 请帮忙。 I am really stuck here. 我真的被困在这里。 I don't want to reload and recreate POIS every time I change my custom slider. 我不想每次更改自定义滑块时都重新加载并重新创建POIS。 I want the GeoOjects to activate and deactivate, so that it would prevent flickering. 我希望激活和禁用GeoOjects,以防止闪烁。

marker.js 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;

}

and call the function from fromwebservice like 然后从fromwebservice调用函数

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

The elements in the array are of type 'Marker'. 数组中的元素类型为“标记”。 Such a Marker does not have a enabled property. 这样的标记没有启用的属性。 You need to extend the class with such a setter and in the implementation, access the underlying AR.GeoObject and change it's enabled property. 您需要使用这样的setter扩展类,并在实现中访问基础的AR.GeoObject并更改其enabled属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM