首页 > 解决方案 > 如何在nativescript中使用MapView在html中使用数据

问题描述

从这个函数我得到数据:

this.spots.spotsnerby().subscribe(
        spot => {
            this.spot = spot;
            for (let j = 0; j < this.spot.features.length; j++) {
                let ii = this.spot.features[j];
               console.log(ii.properties.stato_stallo);
        });



 onMarkerSelect(arg) {
          console.log('id', id);
    }

html

<MapView class="map" (mapReady)="onMapReady($event)" markerSelect)="onMarkerSelect($event)"></MapView>

如何ii.properties.stato_stallo从 html 代码中进行选择?

你能问我任何想法吗?

标签: angularfor-loopnativescript

解决方案


推荐阅读