Antun and Sebastian,
You had both asked about linking swf9 laszlo apps at compile with .swc
libraries.

A while ago I added a line in the call to the flex compiler which adds
WEB-INF/flexlib into the library path when compiling.

I got a Laszlo application to compile and link to the Google Flex SDK,
by putting the swc libraries in the WEB-INF/flexlib directory

ls -l  ../../WEB-INF/flexlib/
total 264
-rw-r-----  1 hqm  staff  65490 Nov  6 20:10 map_1_7a.swc
-rw-r-----  1 hqm  staff  66404 Nov  6 20:10 map_flex_1_7a.swc
badtzmaru-7:maps hqm$

and then I ran this app, in maptest.lzx:


<canvas debug="true">
    <script when="immediate"><![CDATA[
         class FlashMapOL {
            #passthrough (toplevel: true) {
                import com.google.maps.*;
            }#

            var map:Map;

            function createMap() {
                map = new Map();
                map.addEventListener(MapEvent.MAP_READY, onMapReady);
                map.width = 640;
                map.height = 480;
                // Henry's key
                map.key =
"ABQIAAAAT-bIcrU96-d2UT9ao4fuQhQeYAb4p95ZEYTsQwGDQ7cOBxduDBQsJj99qzzLWoeHwQer1vjPN0wTNg";
                return map;
            }

             function onMapReady(event:MapEvent):void {
                this.map.setCenter(new LatLng(40.736072,-73.992062),
14, MapType.NORMAL_MAP_TYPE);
            }

        }

        var mapfactory = new FlashMapOL();
        lz.map = mapfactory.createMap();

    ]]>
    </script>
     <button onclick="canvas.sprite.addChild(lz.map)">Add Map to Canvas</button>

</canvas>

However it seems to be getting an error because it expects to have the
Flex mx framework running, and we aren't
including the setup and environment for a flex application.


badtzmaru-7:maps hqm$ fdb
"http://127.0.0.1:8080/trunk4/test/maps/maptest.lzx?lzr=swf9";
Adobe fdb (Flash Player Debugger) [build 0]
Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
Attempting to launch and connect to Player using URL
http://127.0.0.1:8080/trunk4/test/maps/maptest.lzx?lzr=swf9
Player connected; session starting.
Set breakpoints and then type 'continue' to resume the session.
[SWF] /trunk4/test/maps/maptest.lzx - 1,154,070 bytes after decompression
(fdb) c
[trace] makeDebugWindow lzconsoledebug= remote= undefined
[SWF] /trunk4/test/maps/maptest.lzx - 357 bytes after decompression
...
...
[SWF] /mapfiles/lib/map_1_7b.swf - 239,387 bytes after decompression
[Fault] exception, information=Error: No class registered for
interface 'mx.styles::IStyleManager2'.
Fault, getInstance() at Singleton.as:111
 111                                                    interfaceName + "'.");
(fdb)


I'm following up on another approach which someone posted which claims
to eliminate the dependency on
the Flex mx application framework, and let you run the google map
utilities from straight Flash/actionscript code

http://kelsocartography.com/blog/?p=522
http://groups.google.com/group/google-maps-api-for-flash/files?pli=1

I'll let you know if I have any luck with that.


-- 
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to