Select to view content in your preferred language

Odd problem with Misaligned layer when map resized

677
4
11-23-2011 05:34 PM
CharlotteCrawford
Emerging Contributor
I've got a map with 2 graphics layers and a heatmap layer on it.  My problem is with the heatmap layer. On resizing the map (by maximizing the browser or zooming in and then clicking the full extent button) sometimes the heatmap layer is placed to the left of where it should be.  If I wiggle the mouse on the map it goes back to the right position.  It's as if something isn't always completing properly.  I checked the Progress event on the map and it is reaching 100% even when this occurs.

Can anybody help with a suggestion about what could be causing this misalignment?
Is there a way I can simulate a mouse wiggle whenever there is a resize to force it back into place?

Thanks
CC
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
I can't reproduce this issue.

Are you able to reproduce this behavior with the interactive sample ?
0 Kudos
CharlotteCrawford
Emerging Contributor
Hi dbroux,

Thanks for trying to help.  I have made a little sample app based on the interactive sample app which reproduces the problem.  The heatmap point I've added should sit on New Zealand (and usually does).  If you resize the browser several times, you should see the problem, the heatmap point will sit off the west coast of NZ.  If you drag the mouse when this happens the heatmap will pop back into the correct place.
I wonder if it is something to do with the MaintainConstraintBehavior or the ConstrainExtentBehavior?

Thanks
CC
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Thanks for this repro case.

I was able to reproduce.
Looks like a bug when both MaintainConstraintBehavior and the ConstrainExtentBehavior are active.
Are you able to reproduce the issue if only one behavior is active?


The workaround may be to remove the MaintainConstraintBehavior for now. But not sure if it's acceptable for you.
0 Kudos
CharlotteCrawford
Emerging Contributor
Hi, I think removing MaintainConstraintBehavior will be an acceptable workaround. 

Thanks
CC
0 Kudos