I am using a for loop to load many different queries(street address)
and obtain the information(distance between the queries) and
store it in a 2d-array (matrix). Send me an email and I can give you
the whole code. I don't have a link, trying to debug my code still. My
code ran smoothly until the directions part. I set the map to null,
the Directionspanel to null, but use the following:
DirectionQueryOptions opts = new DirectionQueryOptions(map,
directionsPanel);
Directions.load(distmat[ii][jj], opts, new
DirectionsCallback()
ii and jj are indices.
I have an error:
java.lang.ExceptionInInitializerError
com.google.gwt.maps.client.geocode.DirectionQueryOptions.<init>
(DirectionQueryOptions.java:62)
I also tried to instatiate the maps and Directions Panel without
setting to null too, and it failed too.
This code is in the server side. So I am not too familiar with the
GOogle Maps GWt library, but I am learning, and I got latest version
from Subversion, and I would like to thank Eric for the help of the
waypoint problem. But I am stuck on this one. I saw the hello maps
demo and it gave tons of example but they use maps, direction panels,
and directionqueryOptions and directions.load but on the client side
within Onmodule, but I want to get the distances on the server side.
I am guessing that is one of the causes for the above error. I got the
latest API version, so as far as I know, the gwt-maps.jar are bug
free. But I am not sure why I got the above error. I tried many
things. I used Directions.load( query, new DirectionsCallback().
Well the focus is to get the distance.
Here is another fragment:
Directions.load(distmat[1][0], new
DirectionsCallback() {
public void onFailure(int statusCode) {
Window.alert("Failed to load
directions: Status "
+ StatusCodes.getName(statusCode) +
" " + statusCode);
}
public void onSuccess(DirectionResults
result) {
GWT.log("Successfully loaded
directions.", null);
Distance1[jjjIndex]
[iiiIndex]=result.getDistance().inMeters();
}
I was doing many possible things to make it work, but no luck in
fixing it. I am thinking is because you can't use maps on the server.
I don't want to display the map but to obtain data(the distance). I
also have done a for loop, and handle the final declarations of the
indexes, so that it can change value.
-Agnes
});
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---