Angular 17 with ArcGIS Item-id

Discussão em 'Angular' iniciado por Hari, Novembro 22, 2024.

  1. Hari

    Hari Guest

    Ref: https://developers.arcgis.com/javascript/latest/get-started-angular/

    I am trying to implement Arcgis with angular, everything is working fine map is displaying and layers are working until Item-Id is hardcoded (<arcgis-map item-id="sdfdfd43443433"...), but I want to assign "item-id" property dynamically, but it is not working correctly, not sure what am I missing here, here is the sample code

    <arcgis-map [item-id]="itemId"></arcgis-map>
    OR
    <arcgis-map item-id="{{itemId}}"></arcgis-map>

    @Component({
    selector: 'app-my-map',
    templateUrl: './my-map.component.html',
    styleUrls: ['./my-map.component.css']
    })
    export class MyMapComponent implements OnInit {
    itemId = 'YOUR_ITEM_ID'; // Replace with your actual item ID

    ngOnInit() {
    }
    }

    Continue reading...

Compartilhe esta Página