05-03-2017 08:26 PM - edited 05-03-2017 10:18 PM
I found the example to zoom to an Apollo feature, which looks like:
function finish(response) { response.results[0].zoom(callback); } function example() { $GP.search({ searchType: "apollo", keywords: "Cherokee" }, finish) }
I want to do something similar on a WMPS feature, like this:
function finish(response) { response.featureId.zoom(callback); } function select() { $GP.selectedFeatures.add({ featureId: featureId, featureClassId: featureClassId }, finish); }
but I get the error:
response.featureId.zoom is not a function
Is there another way of zooming to a WMPS feature?
Thanks.
Solved! Go to Solution.
05-09-2017 04:55 AM
Hi Jason,
Yes, it looks like this method is not populated in the SDK. The selectedFeatures returns Feature object offering those methods (functions):
To zoom to this feature, I would:
Regards,
Jan
05-10-2017 05:30 PM
Thanks Jan, this a good solution for now.
Regards,
Jason