I wouldn't assume that because everything worked fine in hosted mode that web mode will work perfectly. There can be hiccups every now and then!
You didn't say which OS/browser you were running, but one of the first things to try is to run web mode under firefox/firebug and see if there are some exceptions that might be short-circuiting your code. There is a problem in the demo showing and hiding Polygons that I've never been able to get to the bottom of, but that problem occurs in both hosted and web mode. On Fri, Feb 6, 2009 at 11:19 AM, bogdan71 <[email protected]> wrote: > > Hello, > > I'm new with GWT and GWT-Maps. I need to plot polylines over a Map > widget. My problem is that the polyline only shows up in Hosted mode. > When running in Web mode, I can't see it. > > More detailed, there's an addRoutes() function I wrote to plot the > polylines: > > private void addRoutes() { > boolean loadOK; > PolyStyleOptions pso = > PolyStyleOptions.newInstance(overlayColor, > weight, opacity); > > DataLoader loader = new DataLoader(); > loadOK = loader.LoadSegments(map, pso); > if(! loadOK) > Window.alert("asyncGet() failed."); > } > > The LoadSegments() method of the DataLoader class tries to access > a segments.txt file, located in the module's root folder. That file > contains a list of GPS coordinates, defining the polylines. > > private static final String segmentsInputPath = "segments.txt"; > > @SuppressWarnings("deprecation") > public boolean LoadSegments(MapWidget m, PolyStyleOptions options) { > boolean result = > HTTPRequest.asyncGet(GWT.getModuleBaseURL() + > segmentsInputPath, > new MapSegmentPlotter(m, options) ); > return result; > } > > Finally, the MapSegmentPlotter class implements the > ResponseTextHandler interface, by overriding onCompletion(String > responseText) to draw the polylines. I don't give its code here - but > I assume that it does the job - since the polylines show up in Hosted > Mode. However, no trace of them in Web mode. Where do I go wrong ? > > > > > -- Eric Z. Ayers - GWT Team - Atlanta, GA USA http://code.google.com/webtoolkit/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
