Select to view content in your preferred language

Graphic objects disappearing when zoom-in/out

2470
5
11-24-2010 11:02 PM
by Anonymous User
Not applicable
Original User: bern2rd

We are experiencing this problem consistently where our graphic elements in the GraphicLayer sometime disappear when we zoom-in and out.  In our example (see attachments) we have seven graphic items highlighted in the color green but for some reason one of them sometime does not show after we zoom-in (three or four times) and zoom-out (one time).  There's definitely a problem in the rendering of the graphic layers.

If someone have had this problem or seen it please help.

Thank you,
Bernard
0 Kudos
5 Replies
DominiqueBroux
Esri Frequent Contributor
Are you experiencing this problem only when the map is rotated or can you reproduce it even when the rotation is not set?
0 Kudos
by Anonymous User
Not applicable
Original User: bern2rd

I removed this line and it fixed the problem.

//myMap.ZoomDuration = TimeSpan.Zero;

This line was added because it solved the problem where when we set the extent constraint the zoom-in feature started to behave strangely.  When clicked on the Zoom-Extent it goes to the full extent without a problem but as soon as you start zooming in it will not response.  This problem goes away after you attempt to zoom-in about 5-6 times.  When I removed this extent constraint everything worked flawlessly but of course without the constraint that we need.

FullExtent.ConstrainedExtent = fullExtentEnvelope;

btw, it has nothing to do with the rotation.

Thanks,
Bernard
0 Kudos
JenniferNery
Esri Regular Contributor
What version of the API are you using?

There is a known issue in v2.1 and lower that when Map's ZoomDuration is zero, the ConstrainedExtent is not respected. 

I have not seen graphics disappear though. Can you share us your code? Maybe we can reproduce it here?  Thanks.
0 Kudos
by Anonymous User
Not applicable
Original User: bern2rd

We're currently using API v2.0. I didnt even know there's v2.1 until you mentioned it. 

Although I'm still experiencing the problem where it does not want to zoom-in when I have this set.

FullExtent.ConstrainedExtent = fullExtentEnvelope;

Should I upgrade to v2.1?

Thanks,
Bernard
0 Kudos
JenniferNery
Esri Regular Contributor
I am confused. Are you using ConstrainExtentBehavior?
http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client.Behaviors~ESRI.ArcGIS.Client....

What type of layer are you using? Is FullExtent a property of this layer or is it the behavior?

FullExtent in the layers is of type Envelope. Have you checked these values in debug mode? Does your map respect this constrain? I don't see why you will have a problem "zooming in." If you try this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ConstrainExtentBehavior. The ConstrainExtent does not allow you to zoom out further than the given constrain, but it allows you to zoom in.

I would upgrade to v2.1 but I also want to understand the problem.
0 Kudos