Javascript API v4.16
Building a page that opens up a map and zooms to the extent of the feature ID passed to it from the previous page.
So far:
1. the feature ID is set in the "localStorage" of page 1
2. in Page 2 I retrieve that value and attempt to zoom to that feature.
3. I have a function that will do the zooming but I can't get it to work.
4. Here is the function:
function zoomToPassedFeature(strLocationCode){
// Create a QUERY for a feature layer in the map
const layQLayer = new FeatureLayer({
url: strMapServiceURL + "/FeatureServer/3" // Yards layer
});
const query = new Query();
query.where = "LocationCode = '" + strLocationCode + "'";