I would like to use searoutes.com for making sailing routes in the GIS. I am not sure how to set it up. Can anyone help?
I would like to use searoutes.com for making sailing routes in the GIS. I am not sure how to set it up. Can anyone help?
I've got an x-api-key and have tried to use the http.request to get data - hope to see what's possible.
The GIS navigator was designed to be extendable. It does this through how function_s() works. If you call function_s(someObject, "someFunction"), then FlexSim searches for someFunction in the object first, then in the object's library definition.
Step 1: I added the following subnodes to the GIS navigator:
Step 2: I copied the code for downloadRoute and downloadRouteSuccess from MAIN:/project/library/GIS/GISNavigator>behaviour/eventfunctions
Step 3: I updated the code for downloadRoute. Basically, I check to see if the url has the term "searoutes.com" in it. If so, I add the x-api-key to the header, and specify the new callbacks for success and failure.
Step 4: In the new success callback, I extract the necessary data from the response by parsing it as a Map. Then I make a new Map the way the GIS Navigator expects in the default applyResponseToRoute function.
The general approach was "copy/paste/modify" so it's not too difficult. Consider using a diff tool to see the changes I made to the code, compared to what's in the library.
The model is attached. You'll need to update the api key in the downloadRoute function to the API key for your account with searoutes.com.
Using this approach, I was able to get the desired route working:
Hello do you have sample searoutes work for flexsim 22.2 version? thank you
5 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved