    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns="*"
             xmlns:mx="http://www.adobe.com/2006/mxml"
             xmlns:os="http://openscales.org"
             creationComplete="initMap();">

        <os:Map id="fxmap"
                width="100%"
                height="100%"
                zoom="11"
                centerLonLat="2.338345,48.871692">

            <os:TraceInfo id="traceInfo"
                          x="{width-200}"
                          y="0"
                          visible="{displayTrace}"/>

            <os:Mapnik name="Mapnik"
                       isBaseLayer="true"
                       proxy="http://openscales.org/proxy.php?url="/>

            <os:KML url="http://www.parisavelo.net/velib.kml"
                    proxy="http://openscales.org/proxy.php?url="
                    numZoomLevels="20"
                    style="{Style.getDefaultCircleStyle()}"/>

            <os:DragHandler/>
            <os:WheelHandler/>

            <os:Spinner id="spinner"
                        x="{width / 2}"
                        y="{height / 2}"/>
            <os:MousePosition x="10"
                              y="{height-20}"
                              displayProjection="EPSG:4326"/>

        </os:Map>

        <os:ControlPanel x="10"
                         y="10"
                         width="140"
                         title="Navigation">
            <os:PanComponent map="{map}"/>
            <mx:HBox width="100%">
                <os:ZoomComponent map="{map}"/>
                <mx:VBox width="100%"
                         horizontalAlign="right"
                         verticalAlign="top">
                    <os:ZoomBoxComponent map="{map}"
                                         width="32"
                                         height="32"/>
                </mx:VBox>
            </mx:HBox>
        </os:ControlPanel>

        <mx:Script>
            <![CDATA[
                import org.openscales.core.popup.Anchored;
                import org.openscales.core.popup.Popup;
                import org.openscales.core.events.FeatureEvent;
                import org.openscales.core.events.MapEvent;
                import org.openscales.core.Map;
                import org.openscales.core.Trace;
                import org.openscales.core.style.Style;

                private var popup:Anchored;

                [Bindable] private var map:Map = null;
                [Bindable] public var displayTrace:Boolean = false;
                [Bindable] public var displayFirebugTrace:Boolean = false;

                private function initMap():void {
                    Trace.useFireBugConsole = displayFirebugTrace;
                    map = fxmap.map;

                    map.addEventListener(FeatureEvent.FEATURE_CLICK, onFeatureClick);
                }

                private function onFeatureClick(event:FeatureEvent):void {
                    if(popup) {
                        popup.destroy();
                    }
                    popup = null;
                    popup = new Anchored();
                    popup.feature = event.feature;
                    map.addPopup(popup, true);
                }
            ]]>
        </mx:Script>

    </mx:Canvas>