Skip to content

Instantly share code, notes, and snippets.

@odoe
Created June 29, 2010 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odoe/457630 to your computer and use it in GitHub Desktop.
Save odoe/457630 to your computer and use it in GitHub Desktop.
package net.odoe.components {
import com.esri.ags.Map;
import mx.controls.Image;
// New logo looks cool, but position changed
// slightly from previous versions and now it's in my way.
// Extend the Map object to tweak it a bit
public class MyMap extends Map {
// variable to hold value to position logo
public var logoToBottom:Number = 0;
override public function MyMap() {
super();
}
override protected function createChildren():void {
super.createChildren();
if (logoToBottom > 0) {
var i:uint = 0;
var x:uint = this.staticLayer.numChildren;
for (i; i < x; i++) {
// logo should be only image object in staticlayer
// but this could change in future releases
if (this.staticLayer.getChildAt(i) is Image) {
// set the bottom property of the image
(this.staticLayer.getChildAt(i) as Image).bottom = logoToBottom;
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment