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 ?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to