Hello i am using search widget for 3d where as per api i have also declared feature layer url but the output of search result showing somewhere else in a wrong position in the map

266
2
07-24-2019 12:00 AM
AnupamSharma
New Contributor III

i am getting the below error,Thank you in advance

dojo.js:334 [esri.views.3d.state.ViewStateManager] #goTo() Failed to create camera from target, no layerview has been found for the layer

Tags (1)
0 Kudos
2 Replies
FlavieMoraux
New Contributor III

I have the same problem since upgrading API version (4.9 to 4.12).

0 Kudos
FlavieMoraux
New Contributor III

This workaround is working for me (with API 4.12) :

1) Desactivate zoom on result

Foreach widget source set property "autoNavigate" to false

2) Zoom programatically on result

on(widget, "search-complete", function(event) {

      if (event.results[0].results[0].feature.geometry.type === "point") {

                  view.goTo({

                        target : event.results[0].results[0].feature.geometry,

                        zoom : 15

                  });

      } else {

                  view.goTo({event.results[0].results[0].extent});

      }

});

0 Kudos