Select to view content in your preferred language

Flex 4 map.addChild(element) with constraints

761
1
07-15-2010 02:27 AM
LukeEvans
Emerging Contributor
Hi,

I'm currently trying to add a couple of things (north arrow and copyright information) as children of a Map object.  The north arrow and copyright info components both have constraint values set.  I've tried using

setConstraintValue("bottom", 40) and bottom = 40 for these but to no effect.  The child items just get added at 0,0 it seems.  I can specifically set the x and y values of these and it will move them but that's not really ideal.

Can anyone suggest where I may be going wrong?

Thanks

Luke
Tags (2)
0 Kudos
1 Reply
ReneRubalcava
Esri Frequent Contributor
Try adding the objects to map.staticLayer
map.staticLayer.addElement(component)

I show an example here adding lat/long coordinates
http://odoe.net/blog/?p=67

The docs for Map state, "StaticLayer is useful for adding legends, logos and other items that should not be moved when the map is panned or zoomed."

That should work.
0 Kudos