Code Monkey home page Code Monkey logo

Comments (13)

branflake2267 avatar branflake2267 commented on July 17, 2024

hmmm. I'll aim to check that out tomorrow. Could you check to see if any calls went out through the network inspection in chrome?

from gwt-maps-v3-api.

duongthaiha avatar duongthaiha commented on July 17, 2024

Just have a quick check and the result there is no DirectionsService.Route call has been made in network inspection. Hope this help

from gwt-maps-v3-api.

branflake2267 avatar branflake2267 commented on July 17, 2024

I'm testing

from gwt-maps-v3-api.

duongthaiha avatar duongthaiha commented on July 17, 2024

Just look into that a bit as well

It seem to stuck at in BrowserChannelServer
reactToMessages function
MessageType messageType = Message.readMessageType(
getStreamFromOtherSide());

I am not sure how it that was link to the api . But hope this can help

from gwt-maps-v3-api.

branflake2267 avatar branflake2267 commented on July 17, 2024

I've got a configuration working. More parameters are needed.

from gwt-maps-v3-api.

branflake2267 avatar branflake2267 commented on July 17, 2024

Going to push up example in a minute

from gwt-maps-v3-api.

branflake2267 avatar branflake2267 commented on July 17, 2024

I've got this working...

    private void drawDirectionsWithMidPoint() {
        DirectionsRendererOptions options = DirectionsRendererOptions.newInstance();
        final DirectionsRenderer directionsDisplay = DirectionsRenderer.newInstance(options);
        directionsDisplay.setMap(mapWidget);

        String origin = "Arlington, WA";
        String destination = "Seattle, WA";

        DirectionsRequest request = DirectionsRequest.newInstance();
        request.setOrigin(origin);
        request.setDestination(destination);
        request.setTravelMode(TravelMode.DRIVING);
        request.setOptimizeWaypoints(true);

        LatLng stopOverWayPoint = LatLng.newInstance(47.8587, -121.9697);
        DirectionsWaypoint waypoint = DirectionsWaypoint.newInstance();
        waypoint.setStopOver(false);
    waypoint.setLocation(stopOverWayPoint);

    JsArray<DirectionsWaypoint> waypoints = JsArray.createArray().cast();
    waypoints.push(waypoint);
    request.setWaypoints(waypoints);

        DirectionsService o = DirectionsService.newInstance();
        o.route(request, new DirectionsResultHandler() {
            public void onCallback(DirectionsResult result, DirectionsStatus status) {
                if (status == DirectionsStatus.OK) {
                    directionsDisplay.setDirections(result);
                    getDistance();
                } else if (status == DirectionsStatus.INVALID_REQUEST) {

                } else if (status == DirectionsStatus.MAX_WAYPOINTS_EXCEEDED) {

                } else if (status == DirectionsStatus.NOT_FOUND) {

                } else if (status == DirectionsStatus.OVER_QUERY_LIMIT) {

                } else if (status == DirectionsStatus.REQUEST_DENIED) {

                } else if (status == DirectionsStatus.UNKNOWN_ERROR) {

                } else if (status == DirectionsStatus.ZERO_RESULTS) {

                }

            }
        });
    }

from gwt-maps-v3-api.

branflake2267 avatar branflake2267 commented on July 17, 2024

I have it working. I pushed new example code and modified a small bug for _gwt_object that came up.

from gwt-maps-v3-api.

branflake2267 avatar branflake2267 commented on July 17, 2024

Demo up with the fix.

https://plus.google.com/111739836936169749229/posts/W69xKGXTCzt

from gwt-maps-v3-api.

duongthaiha avatar duongthaiha commented on July 17, 2024

Just update from the master branch. Work like magic! Thank you very much.

Do you mind to tell me what has went wrong if possible? Just try to understand the api a bit more

from gwt-maps-v3-api.

branflake2267 avatar branflake2267 commented on July 17, 2024

Good question :) I think the stepOver or other parameter needed to be set. I didn't stop to confirm which other parameter it was. But I also noticed a _gwt_Object during debugging which only happens in dev mode come up and it could have been that too.

from gwt-maps-v3-api.

duongthaiha avatar duongthaiha commented on July 17, 2024

Yeah i put the add wa ypoint sample code you uploaded with the old jar file and it did not work :( So what i have done is to get the source code from the master and reference to the source and it works. Yayyy
I had a look into what have been changed in your direction branch but could figure what is the different.

from gwt-maps-v3-api.

branflake2267 avatar branflake2267 commented on July 17, 2024

Good job. Oops, yeah, I have to get the jar distribution setup, thats on the todo list. Next weekend I should have that done.

from gwt-maps-v3-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.