<widget right="10" top="50" config="widgets/Navigation/NavigationWidget.xml" url="widgets/Navigation/NavigationWidget.swf"/>
esri|ScaleBar { right: 10; bottom: 20; left: NaN; top: NaN; }
Hi Robert,
I am looking to move the scale bar to the right as well so that it doesn't interfere with the Advanced Search Results tab in the lower-left corner. However, in the main application folder, I don't see a default.css file - only a default.htm file.
In the default.htm file there are the following lines of code that reference css....
<style type="text/css" media="screen">
html, body { height:100%; }
body { margin:0; padding:0; overflow:auto; text-align:center;
background-color: #ffffff; }
object:focus { outline:none; }
#flashContent { display:none; }
</style>
Is this where I would insert the syntax you mentioned above to Phillip or am I looking in the wrong spot?
Thanks,
Andrew
Andrew,
This fix is for those that are using the Viewers source code. It sounds like you are using a compiled version of the viewer and thus this change is not available to you.
Good to know. Do you have any suggestions, using the compiled Viewer, so that the scale bar and the Search Results tab from your Advanced Search data grid don't both show up in the lower-left corner on top of each other?
Thanks again,
Andrew
Andrew,
No, no suggestions for the compiled viewer.
public static function getScaleBar(map:Map):ScaleBar { var pDisplayObject:DisplayObjectContainer = null; var pScaleBar:ScaleBar = null; for (var i:int = 0; pScaleBar == null && i < map.numChildren; i++) { pScaleBar = getScaleBarRecursive(map.getChildAt(i) as DisplayObjectContainer); } return pScaleBar; } private static function getScaleBarRecursive(pDisplayObject:DisplayObjectContainer):ScaleBar { var pScaleBar:ScaleBar = null; if (pDisplayObject == null) { return null; } if (pDisplayObject is ScaleBar) { pScaleBar = pDisplayObject as ScaleBar; } for (var i:int = 0; pScaleBar == null && i < pDisplayObject.numChildren; i++) { pScaleBar = getScaleBarRecursive(pDisplayObject.getChildAt(i) as DisplayObjectContainer); } return pScaleBar; }