Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generateDestinationData doesn't work correctly in webpack #81

Open
Xin-Zheng opened this issue Apr 2, 2017 · 12 comments
Open

generateDestinationData doesn't work correctly in webpack #81

Xin-Zheng opened this issue Apr 2, 2017 · 12 comments

Comments

@Xin-Zheng
Copy link

Xin-Zheng commented Apr 2, 2017

Here is the code for moveDestination. There are two problems when I use it in webpack.

  • You can see the snapshot in attachment.
    The traveltime is not equal to waitTime + inVehicleTravelTime + walktime
  • If the shortest path from A to B is just a walk journeys, generateDestinationData works fine.
    But if it contains transit journey, the whole browsochrones instance will be stuck . No error pop up. No response.
    Both isochrone and transitive are all dead.
async moveDestination(e) {
    let destination = e.target.getLatLng();
    let zoom = e.target._map._zoom;
    const point = this.bs.pixelToOriginPoint(Leaflet.CRS.EPSG3857.latLngToPoint(destination, zoom), zoom);
    let { transitive, travelTime, waitTime, walkTime, inVehicleTravelTime } = await this.bs.generateDestinationData({from: this.state.origin, to:point});
    this.setState({ ...this.state, transitive, travelTime, walkTime, waitTime, inVehicleTravelTime, key: uuid.v4() })
  }

browsochrones bug

@trevorgerhardt
Copy link
Member

Hi @Xin-Zheng! What data set are you using to run into these problems? Are you running into this problem when using the example code?

@Xin-Zheng
Copy link
Author

Hi @trevorgerhardt, I request the data from MIT server. The isochrone works fine but transitive path doesn't work. I think that is not a problem with the data I used. Because I try browsochrones-example (https://github.com/conveyal/browsochrones-example) and request exactly the same data from MIT server. It works fine.

@trevorgerhardt
Copy link
Member

Ideally we want to isolate the problem as much as possible. Right now it's extremely unclear where the problem might be coming from.

How would I be able to recreate this exact problem locally?

@Xin-Zheng
Copy link
Author

@trevorgerhardt
just clone https://github.com/mitTransportAnalyst/CoAXs-React.git
and go to the "develop" branch
do npm install and npm start
move the origin marker first and wait for it loading the stop tree and metadata
and move the destination marker.

I have console.log the data which generateDestinationData() output

Thank you very much

@Xin-Zheng
Copy link
Author

In order to help you isolate the problem, I dump all the data I get from MIT server. Here is the links.
https://github.com/mitTransportAnalyst/Browsochrones-Test

The data is for Boston and I use webpack version of browsochrones
Thanks.

@trevorgerhardt
Copy link
Member

All information is great but to debug a browsochrones problem I need to isolate it to browsochrones. Can you open a pull request to browsochrones that edits the example to use data that shows the problem you are having?

@Xin-Zheng
Copy link
Author

Hi @trevorgerhardt, I just create a new pull request and add the test data in the test/data folder. Thanks

@trevorgerhardt
Copy link
Member

I'll check it out 👌

@Xin-Zheng
Copy link
Author

@trevorgerhardt Thank you very much

@trevorgerhardt
Copy link
Member

I guess I wasn't clear with my request. The test data doesn't just need to be added, the example needs to be updated to use the test data. Right now the example in the Pull Request still uses the data from our IndyConnect project.

Also @Xin-Zheng, this is currently Open Source support and not billed hours. I would like to help, but I'm not going to dig into outside code or data without being shown that it's clearly a Browsochrones issue first. I'm asking you to demonstrate that, which has not been done yet.

@Xin-Zheng
Copy link
Author

Got it. I will update the example code to use the Boston data to show the problem. Thanks

@Xin-Zheng
Copy link
Author

Hey @trevorgerhardt, I just create a new PR and comment the issue on that PR. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants