From: Christopher N. <cna...@gm...> - 2010-03-02 18:35:50
|
Has anyone tried to wrap the VirtualEarth layer of OpenLayers for GWT? I wrote a simple wrapper class similar to the gwt-openlayers Google/GoogleImpl where VirtualEarthImpl has one method: public static native JSObject create(String name) /*-{ return new $wnd.OpenLayers.Layer.VirtualEarth(name); }-*/; and class VirtualEarth extends Layer and has a single public method that calls VirtualEarthImpl.create(string). In my html file I added the line: <script src=" http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2&mkt=en-us "></script> similar to the OpenLayers example at http://openlayers.org/dev/examples/bing.html However, when I run my gwt code, I receive the following error in the map: The VE Layer was unable to load correctly. Most likely this is because the VirtualEarth library script was not correctly included. However, I wrote a pure JavaScript example that works just fine. Has anyone tried to wrap the VirtualEarth class and had success? If so, can you provide some insight into what I am doing wrong? Thanks, Chris |