function selectParcel(parcelid) { if (parcelid) { var query = new Query(); query.where = "PARCELID = '" + parcelid + "'"; var deferred = parcels.selectFeatures(query, FeatureLayer.SELECTION_NEW, function (selection) { var center = graphicsUtils.graphicsExtent(selection).getCenter(); // add parcel to browser history var apn = selection[0].attributes.APN; if ((typeof history.pushState !== "undefined") && (apn)) { window.history.pushState(null, null, "?getParcel=" + apn); } var extHandler = map.on("extent-change", function () { extHandler.remove(); //zoom to the center then display the popup map.infoWindow.setFeatures(selection); map.infoWindow.show(center); }); map.centerAt(center); }); } }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.