Select to view content in your preferred language

Graphics are hidden on map after migrating from JavaScript API from 2.5 to 3.2

701
3
12-04-2012 10:09 PM
YardenCochav
Deactivated User
Hi,

After migration from JavaScript API from 2.5 to 3.2, the graphicsLayer suddenly was hidden from map. It happens only when doing panning operation.
I have a special handling for the events "onPanStart" and "onPanEnd".
When "onPanStart" happens - I hide all the graphics layers
When "onPanEnd" happens - I show all the graphics layer.

Everything works fine in version 2.5, but after upgrading to version 3.2  - the graphics suddenly hidden after pan operation.
When I doing zoom operation, the graphics layers become visible.
I cancelled the handling for "onPanStart" and "onPanEnd", and the problem didn't happen.

I really appreciate any assistance, because I can't upgarde the API version because of this critical issue.
Yarden
0 Kudos
3 Replies
derekswingley1
Deactivated User
Why not use displayGraphicsOnPan: false when you create your map so that you don't need custom event handlers to hide/show your graphics?
0 Kudos
YardenCochav
Deactivated User
I am using custom handling , because we need to hide specific graphics layers and not all layers.

Yarden
0 Kudos
derekswingley1
Deactivated User
Understood. Can you post code that reproduces the issue? Preferably a simplified version of what you're using.
0 Kudos