psiclopz

Problem with MapControl ZoomTo function

Discussion created by psiclopz on Aug 24, 2011
Latest reply on Aug 25, 2011 by psiclopz
I have a dynamic map layer that isn't too big, about 3MB and covers a small city.  The Spatial Reference is WGS1984, and when I'm zoomed out to about 5 miles
Current Extent
{-105.648646719718,39.4326771438573,-104.79220419392,39.9928913136732}
Current Resolution
0.0010075794421150457

and I call the ZoomTo function with the following Envelope:
Target Extent
{-105.084665364248,39.792117044473,-105.068414635752,39.806022955527}
Target Resolution (found after successful zoom)
0.000025010631392172615

It zooms in, but only to
Extent
{-105.600432200536,39.4741775379836,-104.840418713102,39.9713157721167}
Resolution
0.00089413351462796109

It will behave this way multiple times, each time getting a little closer, and then it seems to hit a threshold, at this level:
Last zoom prior to correct zoom
{-105.387896443315,39.6359911435199,-105.00900343813,39.8838317445586}
Resolution
0.00044575647668834256

When I get to this level and call ZoomTo again with the same envelope it finally zooms all the way down and goes right where I'm directing it.

The only thing other than just loading the map is, in the LayersInitialized handler I'm setting a ConstraintExtentBehavior to
{-105.434096549246,39.0508435660878,-105.006754364392,39.9928913136732}

and setting the MinimumResolution to 0.00013019812815945168
and the MaximumResolution to 0.13019812815945167.

I did try commenting out the constraint stuff and it didn't seem to make a different.

So, what am I doing wrong?  Or is there a level above which you can't zoom directly all the way down?

Thanks,

James

Outcomes