NW/GIS: Update sample models to work in NetLogo Web - #452
Conversation
e17ce53 to
759724f
Compare
- Add GIS Airport Example, based on the GIS vector tutorial - Update GIS General Examples and GIS Gradient Example to use embedded resources for their data; resources are still kept in the report for reference or updates. - Update NW General Examples to include saving/loading networks to/from strings, saving files from strings, and loading from embedded resources.
759724f to
7dda839
Compare
|
Thanks, Jeremy! All functions and all the example models work well. I only have one suggestion about the NW General Examples model. Since there's a "save to file" button in this model, I expected a matching "load from file" button. At first glance I mistook "load from resource" for the button that would load the network I just saved, but it actually loads an example network instead. Would it make sense to rename "load from resource" to "load from example," and add a separate "load from file" button that loads what the user just saved? That would make the save/load pairing clearer. Thanks! |
|
Hey Franz, Thanks for the feedback. I went ahead and restored the file load button with a check that the file was saved first. That will error on NetLogo Web, but that's expected as it's unsupported there, so the message should be clear. I renamed the resource load button to "load example resource" as I want to emphasize the source of that data. Let me know if you need anything else. |
|
Thanks, Jeremy! This looks great! |
NetLogo Web has recently added support for the NW and GIS extensions. These extensions include data loading/saving commands that only work on the local file system, but now we've added string-based alternatives so NetLogo Web can load and save data for them, too. This PR updates the NW and GIS code examples to work with NetLogo Web.
The GHA tests did not pass, but I don't think they're passing on
main, either. Manual tests all went fine for me in 7.0.4 and NLW latest. Let me know if you need any changes. Thanks!