Hi Koen, When I look at the page with firebug, it seems to be correct.
I did some research on the internet. Other people seem to have similar problems with javascript libraries that depend on other javascript libraries. It has nothing to do with Wt. If I remember correctly, the browsers load the script libraries parallel and serialize only by host. Because the google maps librariy comes from another host than the additional library, the browser thinks it can load them both at the same time. There are some lazy loading libraries. But combining them with Wt seemed to be difficult. I also tried to extract the relevant parts from the js library and paint the svg directly in the widget. But didn't get it to work so far. So I tried another approach, painting some simple circles as polylines. That works as long as I have only one google map on the page. But as soon as I have two or three maps on the same page, no polyline overlays are displayed at all. That's a different problem though, which I'm going to inspect soon. I thought about using the Wt painting system to draw map overlays, but haven't had time to investigate. Would that be feasible? The current code is a bit messy: http://flightpred.svn.sourceforge.net/viewvc/flightpred/trunk/src/web/WGoogleMapEx.cpp?view=markup I'll keep trying, and maybe come back if further questions arise. Rgds Richard On Wed, 2009-12-23 at 18:30 +0100, Koen Deforche wrote: > Hey Richard, > > 2009/11/24 Richard Ulrich <[email protected]>: > > is it possible to give an order in which the java script libraries are > > loaded with WApplication::require? > > They now are ordered as they are chronologically called. > > > I'm trying to extend the WGoogleMap with some scripts from > > http://www.bdcc.co.uk/Gmaps/BdccGmapBits.htm > > > > But firebug tells me that the google maps classes used in these scripts > > are not defined. So I suspect these scripts are loaded before the google > > maps script. > > > > that's how I try: > > > > WGoogleMapEx::WGoogleMapEx(WContainerWidget *parent) > > : WGoogleMap(parent) // google maps script is 'required' here > > { > > WApplication *app = WApplication::instance(); > > > > app->require("/googlemaps_addons/BDCCCircle.js"); > > app->require("/googlemaps_addons/BDCCArrow.js"); > > } > > > > I modified the script to use google.maps.Overlay instead of GOverlay, > > but the result is the same. > > It really should work. If you inspect with Firebug in the <head> > section, do you see that the order is wrong ? > > Regards, > koen > ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
