I got this Err: Graphic is not defined. how should I fix it?
On the function test try to pass on method goTo the geometry from the selected graphic
function test(x){ //alert(searchResults.feature.geometry); //query features in tree layer based on objid, this will return a graphic view.goTo(searchResults.feature.geometry) }
also when you construct the results table add on click the array number in order later (on test function) access the item from the searchResults array.
Hi There,
I have changed my code and moved it, but still get the Graphic is not defined Err! actually I want to view my popup template after clicking search results in the search table. but my function didn't work and the Err was Graphic is not defined.
move the following code at line 115
var graphic = new Graphic({ getAttribute: "objectid", popupTemplate:template });
and add the var at the beginning
see below
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.