Select to view content in your preferred language

Icon displays underveath graphics

887
4
07-30-2012 09:04 AM
KyleDixon
Deactivated User
I have a map that draws polylines and displays icons. The icons are appearing underneath the graphics, how can I set the layering to always display the icons on top? Do I need to add another graphics layer?
0 Kudos
4 Replies
JeffPace
MVP Alum
I have a map that draws polylines and displays icons. The icons are appearing underneath the graphics, how can I set the layering to always display the icons on top? Do I need to add another graphics layer?


As far as I am aware, graphics are always on top.  If you want icons on top of graphics you would have to render them IN the graphics layer.
0 Kudos
KyleDixon
Deactivated User
The icons are added to the graphics layer, but the icons are still displayed underneath.
0 Kudos
JeffPace
MVP Alum
my guess is that the graphicslayer is an array and is displaying based on order added. 

I am not sure if you can "unshift" them or add them at a higher position/lower index.
0 Kudos
derekswingley1
Deactivated User
Each graphic has a getDojoShape method. Once you have the gfx object, you can call moveToFront or moveToBack.
0 Kudos