I'd like to set the startExtent to the envelop of a feature that is based on a passed in parameter. I can't figure this out, maybe I'm just not thinking.
Would need to know more about your application's architecture to give a complete answer. But in my case, to build the extent I'm taking my initial point and then "zooming out" a bit. var featureExtent = new esri.geometry.Extent(
{
"ymin": eval($("#Lat").val()) - 0.0025,
"xmin": eval($("#Lon").val()) - 0.0025,
"ymax": eval($("#Lat").val()) + 0.0025,
"xmax": eval($("#Lon").val()) + 0.0025,
"spatialReference": { "wkid": 4326 }
});
myMap = new esri.Map("mapDiv", { extent: featureExtent });
I'm using jQuery and hidden fields, but you could make the extent a parameter and use that.