Hi all,
Seems like this should be an easy operation but for some reason the view.goTo() is not doing anything at all
Thinking this might be a spatial reference issue (?) but not sure how to fix it...(the online sample code worked for me but the zoom imagery layer's wkid is 4326...)
Additional info:
view.spatialReference's wkid is 102100
event.item.layer's wkid is 102190
Any help is appreciated!! Thank you!! - Jenny
const layerlist = new LayerList({
view: view,
container: dom.byId("legend"),
listItemCreatedFunction: function(event){
const item = event.item // ListItem class
if (item.layer.type !== "group"){
item.actionsSections = [[{
title: "Zoom To",
className: "esri-icon-zoom-in-magnifying-glass",
id: "zoom-to"
}....
view.when(function(){
// layer list trigger action:
layerlist.on("trigger-action", function(event){
console.log("triggered event", event.item.layer)
// capture action id:
let id = event.action.id;
if (id === "zoom-to"){
view.goTo(event.item.layer.fullExtent) // not working...
}....