map.setExtent(myextent);
I see this post is pretty old, I'm looking for a way to to the same thing. Did you ever find a reasonable answer?
Yes, run the definition query in sql (we use Java JDBC) and use st_geometry functions to get the min and max for the returned features. Then set the map extent to those values.
Thanks for the reply. I’m a novice with javascript, I’m not sure how I would retrieve these values in javascript? Do you have some sample code you wouldn’t mind sharing?