简体   繁体   中英

Structure of MarkerList array in Wikitude Javascript SDK

WikiTude Augmented reality JavaScript SDK has an array of markers named 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.

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. I want the GeoOjects to activate and deactivate, so that it would prevent flickering.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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