Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

sweiland-openrails
Copy link
Contributor

Enhancements for OpenRailway Map:

  • added web browser tab Open Rails icon (favicon)
  • changed locomotive icon, now three icons: steam, electric, diesel
  • added locomotive direction arrow
  • added three OpenRailway layers to choose from: maximum speed, guage and electrification. Choice stored in registry and used the next opening of the map.
  • added three layers with Open Rails data: track, named and rest. Choice also stored.

Don't know if these layers are usefull, anyway they can be switched on and off again.

Names of the layers are not translateble, is that a problem? Would be hard to implement.

For some routes the track layer takes too much performance from the web browser because of tracks size (for instance the MECoast line). But it gives you an idea of the layout of the track in the real world.

On the Ruebelandbahn for the "RLB Schneepflug Fahrbar" the locomotive arrow on the map is in the wrong direction (180 degrees). I can't find out why. Not seen this for any other locomotive.

- added web browser tab Open Rails icon (favicon)
- changed locomotive icon, now three icons: steam, electric, diesel
- added locomotive direction arrow
- added three OpenRailway layers to choose from: maximum speed, guage and electrification. Choice stored in registry and used the next opening of the map.
- added three layers with Open Rails data: track, named and rest. Choice also stored.

Don't know if these layers are usefull, anyway they can be switched on and off again.

Names of the layers are not translateble, is that a problem? Would be hard to implement.

For some routes the track layer takes too much performance from the web browser because of tracks size (for instance the MECoast line). But it gives you an idea of the layout of the track in the real world.

On the Ruebelandbahn for the "RLB Schneepflug Fahrbar" the locomotive arrow on the map is in the wrong direction (180 degrees). I can't find out why. Not seen this for any other locomotive.
this is just a local file
@cjakeman cjakeman added the for-unstable Special label to include a pull request in the Unstable Version label Jan 16, 2023
twpol pushed a commit that referenced this pull request Jan 16, 2023
- Pull request #706 at 91bcfa2: Extended door functionality
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at dc256cd: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #746 at f5566d7: Website release 1.5.1
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #761 at f6a3aca: fix: Allow 100% cloud-free skys by making 0% overcast = 0% clouds
- Pull request #763 at 12e250d: build: Remove use of SolutionDir which is not supported everywhere
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at f143fcc: Control Car additional functionality
- Pull request #767 at 719c737: Refine sunrise and sunset
- Pull request #768 at f2f3e11: OpenRailway Map enhancements
Copy link
Contributor

@cjakeman cjakeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Siebren,

You've made some nice enhancements here and I have added the for-unstable label to this PR so your work is now included in the Unstable Version.

I'm happy that you have extended the ApiMap() to return the direction as well as the LatLon. Of course, once published, APIs cannot change as that would break the code based on them, but we haven't reached that point yet.

There are some changes I would like you to consider, if you wouldn't mind.

  1. Could we have some images and text added to the Manual (section 19.7.1), please? If this is difficult for you to add, let me know and I can help or do it for you.

  2. Storing settings is good practice and you've gone to some trouble to store these in the Windows Registry as part of the Open Rails settings.

I don't think this is a good idea because the Sample Web Pages are intended to be an extension to Open Rails rather than an integral part. The aim is to provide a robust API and some sample pages which users can tinker with and customise as they wish.

Would you please try saving the settings in the browser instead, using the local storage provided by the HTML Web Storage API instead?

  1. C~ uses differnt capitalisation conventions from JavaScript and I notice that you have used camelCase for a number of methods and class properties. Please would you change them to PascalCase. We follow the Microsoft C# Coding Conventions (see link at https://github.com/openrails/openrails/blob/master/Docs/Contributing.md)

I hope this is not asking too much of you. I tried it out using the Northeast Corridor, as that matches LatLon better than Demo Model 1 and it's very effective.

twpol pushed a commit that referenced this pull request Jan 17, 2023
- Pull request #706 at 91bcfa2: Extended door functionality
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at dc256cd: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #746 at f5566d7: Website release 1.5.1
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #761 at f6a3aca: fix: Allow 100% cloud-free skys by making 0% overcast = 0% clouds
- Pull request #763 at 12e250d: build: Remove use of SolutionDir which is not supported everywhere
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at f143fcc: Control Car additional functionality
- Pull request #767 at 719c737: Refine sunrise and sunset
- Pull request #768 at 5e4989c: OpenRailway Map enhancements
twpol pushed a commit that referenced this pull request Jan 17, 2023
- Pull request #706 at 91bcfa2: Extended door functionality
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at dc256cd: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #746 at f5566d7: Website release 1.5.1
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #761 at f6a3aca: fix: Allow 100% cloud-free skys by making 0% overcast = 0% clouds
- Pull request #763 at 12e250d: build: Remove use of SolutionDir which is not supported everywhere
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at f143fcc: Control Car additional functionality
- Pull request #767 at 719c737: Refine sunrise and sunset
- Pull request #768 at 5fdb384: OpenRailway Map enhancements
twpol pushed a commit that referenced this pull request Jan 17, 2023
- Pull request #706 at 91bcfa2: Extended door functionality
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at dc256cd: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #746 at f5566d7: Website release 1.5.1
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #761 at f6a3aca: fix: Allow 100% cloud-free skys by making 0% overcast = 0% clouds
- Pull request #763 at 12e250d: build: Remove use of SolutionDir which is not supported everywhere
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at f143fcc: Control Car additional functionality
- Pull request #767 at 719c737: Refine sunrise and sunset
- Pull request #768 at a0eae37: OpenRailway Map enhancements
@sweiland-openrails
Copy link
Contributor Author

hi Chris,

Done the changes you suggested.

  1. added some text and image to the manual, see a PM I send to you in Elvastower. Was wondering where I could see the result of this.
  2. Web Storage API is better and not so difficult. Hop[e I've removed all the registry code I added.
  3. I knew about PascalCase and camelCase for C#. However I thought variables where supposed to be named in camelCase. Please let me know if anything is still wrong of changed wrongly. No problem.

If you have more remarks, please let me know.

twpol pushed a commit that referenced this pull request Jan 17, 2023
- Pull request #706 at 91bcfa2: Extended door functionality
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at dc256cd: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #761 at f6a3aca: fix: Allow 100% cloud-free skys by making 0% overcast = 0% clouds
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at f143fcc: Control Car additional functionality
- Pull request #767 at 9317f8c: Refine sunrise and sunset
- Pull request #768 at a0eae37: OpenRailway Map enhancements
twpol pushed a commit that referenced this pull request Jan 18, 2023
- Pull request #706 at 91bcfa2: Extended door functionality
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at 2042e44: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #761 at f6a3aca: fix: Allow 100% cloud-free skys by making 0% overcast = 0% clouds
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at f143fcc: Control Car additional functionality
- Pull request #767 at 9317f8c: Refine sunrise and sunset
- Pull request #768 at a0eae37: OpenRailway Map enhancements
twpol pushed a commit that referenced this pull request Jan 18, 2023
- Pull request #706 at 91bcfa2: Extended door functionality
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at 83002d7: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #761 at f6a3aca: fix: Allow 100% cloud-free skys by making 0% overcast = 0% clouds
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at f143fcc: Control Car additional functionality
- Pull request #767 at 9317f8c: Refine sunrise and sunset
- Pull request #768 at a0eae37: OpenRailway Map enhancements
twpol pushed a commit that referenced this pull request Jan 18, 2023
- Pull request #719 at 13a1638: Upgraded to MonoGame 3.8.0 (+ small update for other libraries)
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at 83002d7: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #761 at f6a3aca: fix: Allow 100% cloud-free skys by making 0% overcast = 0% clouds
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at f143fcc: Control Car additional functionality
- Pull request #767 at 9317f8c: Refine sunrise and sunset
- Pull request #768 at a0eae37: OpenRailway Map enhancements
@cjakeman
Copy link
Contributor

1. added some text and image to the manual, see a PM I send to you in Elvastower. Was wondering where I could see the result of this.

I replied to your PR but, for other people reading this, once changes are committed, the HTML version of the Manual for Unstable is available at https://open-rails.r...atform.html#id2

3. I knew about PascalCase and camelCase for C#. However I thought variables were supposed to be named in camelCase. Please let me know if anything is still wrong of changed wrongly. No problem.

In C# camelCase is used for method parameters. The Microsoft document says nothing about variables local to a method, but you are right that they are commonly camelCase too.

The class properties are now all in PascalCase - thanks. Would you also be able to change the class methods to PascalCase and the method parameters to camelCase as well, please? E.g.:

private void initTypeOfLocomotive(string PowerSupplyName)

Thanks for this,
Chris

twpol pushed a commit that referenced this pull request Jan 18, 2023
- Pull request #717 at 98221c0: Allow unlimited number of TCS cabview controls
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at 83002d7: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #761 at f6a3aca: fix: Allow 100% cloud-free skys by making 0% overcast = 0% clouds
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at f143fcc: Control Car additional functionality
- Pull request #767 at 9317f8c: Refine sunrise and sunset
- Pull request #768 at a0eae37: OpenRailway Map enhancements
twpol pushed a commit that referenced this pull request Jan 18, 2023
- Pull request #717 at 98221c0: Allow unlimited number of TCS cabview controls
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at 83002d7: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #761 at f6a3aca: fix: Allow 100% cloud-free skys by making 0% overcast = 0% clouds
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at f143fcc: Control Car additional functionality
- Pull request #767 at 9317f8c: Refine sunrise and sunset
- Pull request #768 at 41c9f26: OpenRailway Map enhancements
twpol pushed a commit that referenced this pull request Jan 19, 2023
- Pull request #717 at 98221c0: Allow unlimited number of TCS cabview controls
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at 83002d7: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at 3d5d238: Control Car additional functionality
- Pull request #767 at 9317f8c: Refine sunrise and sunset
- Pull request #768 at 41c9f26: OpenRailway Map enhancements
twpol pushed a commit that referenced this pull request Jan 19, 2023
- Pull request #717 at 98221c0: Allow unlimited number of TCS cabview controls
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at 83002d7: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at 3d5d238: Control Car additional functionality
- Pull request #767 at 9317f8c: Refine sunrise and sunset
- Pull request #768 at bc8aea4: OpenRailway Map enhancements
twpol pushed a commit that referenced this pull request Jan 19, 2023
- Pull request #717 at 98221c0: Allow unlimited number of TCS cabview controls
- Pull request #719 at 0f4d975: Upgraded to MonoGame 3.8.0 (+ small update for other libraries)
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at 83002d7: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at 3d5d238: Control Car additional functionality
- Pull request #767 at 9317f8c: Refine sunrise and sunset
- Pull request #768 at bc8aea4: OpenRailway Map enhancements
twpol pushed a commit that referenced this pull request Jan 19, 2023
- Pull request #717 at 98221c0: Allow unlimited number of TCS cabview controls
- Pull request #719 at 0f4d975: Upgraded to MonoGame 3.8.0 (+ small update for other libraries)
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at 83002d7: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at 3d5d238: Control Car additional functionality
- Pull request #767 at 9317f8c: Refine sunrise and sunset
- Pull request #768 at bc8aea4: OpenRailway Map enhancements
twpol pushed a commit that referenced this pull request Jan 20, 2023
- Pull request #719 at 0f4d975: Upgraded to MonoGame 3.8.0 (+ small update for other libraries)
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at 83002d7: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #765 at 083467b: Bug fix for https://bugs.launchpad.net/or/+bug/2002183 OK to proceed sound played wrongly
- Pull request #766 at c9657de: Control Car additional functionality
- Pull request #767 at 9317f8c: Refine sunrise and sunset
- Pull request #768 at bc8aea4: OpenRailway Map enhancements
twpol pushed a commit that referenced this pull request Jan 20, 2023
- Pull request #719 at 0f4d975: Upgraded to MonoGame 3.8.0 (+ small update for other libraries)
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at 83002d7: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #751 at f947f29: Web interface to control cab controls with external hardware
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #760 at 113dd63: Updated EditorConfig with .NET and StyleCop analyzer configuration
- Pull request #764 at 5f9a01b: fix: Improve sky dome distortion causing bug #1471416
- Pull request #766 at c9657de: Control Car additional functionality
- Pull request #767 at 9317f8c: Refine sunrise and sunset
- Pull request #768 at bc8aea4: OpenRailway Map enhancements
twpol pushed a commit that referenced this pull request Jan 21, 2023
- Pull request #719 at 0f4d975: Upgraded to MonoGame 3.8.0 (+ small update for other libraries)
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at 83002d7: Improvements for air brakes
- Pull request #735 at b9a0ea3: Added new parameter for battery switch
- Pull request #751 at f947f29: Web interface to control cab controls with external hardware
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #766 at c9657de: Control Car additional functionality
- Pull request #767 at 9317f8c: Refine sunrise and sunset
- Pull request #768 at bc8aea4: OpenRailway Map enhancements
- Pull request #769 at 1a99f43: Partial turntables https://blueprints.launchpad.net/or/+spec/partial-turntable
Copy link
Contributor

@cjakeman cjakeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Siebren,

Many thanks for doing that.

Approved.

Chris

@cjakeman cjakeman merged commit 5072d72 into openrails:master Jan 21, 2023
twpol pushed a commit to openrails/openrails.org that referenced this pull request Jan 28, 2023
…p_in_browser

OpenRailway Map enhancements
@sweiland-openrails sweiland-openrails deleted the map_in_browser branch September 23, 2023 07:39
@twpol twpol added the enhancement New feature or request label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request for-unstable Special label to include a pull request in the Unstable Version
Development

Successfully merging this pull request may close these issues.

3 participants