I've changed using esri.arcgis.utils.createMap and stored it in variable map, but I can't alter the function of the coding below.
//select parcel from the feature layer by creating a query to look for the input parcel id function selectParcel(parcelid) { if (parcelid) { var query = new esri.tasks.Query(); query.where = "PARCELID = '" + parcelid + "'"; var deferred = parcels.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW, function (selection) { var center = esri.graphicsExtent(selection).getCenter(); var extHandler = dojo.connect(map, 'onExtentChange', function () { dojo.disconnect(extHandler); //zoom to the center then display the popup map.infoWindow.setFeatures(selection); map.infoWindow.show(center); }); map.centerAt(center); });
}
}
is there any alternative not to use parcels.selectFeatures? whether parcels.selectFeatures only applies to mapservice? what the successor function for webmap ArcGIS?. thank you