This repository was archived by the owner on Dec 18, 2023. It is now read-only.
Open
Conversation
This commit aims to get Mapnik working for newer Android versions, which is done by upgrading osmdroid to latest. This update implies some porting work : - use Double instead of int argument when calling setMinZoomLevel. - enhance osmdroid configuration : call 'load' to ensure config (github.com/osmdroid/osmdroid/wiki/How-to-use-the-osmdroid-library) and customize user-agent to access tiles following recommendations (github.com/osmdroid/osmdroid/wiki/Important-notes-on-using-osmdroid- in-your-app#set-the-http-user-agent-variable). - replace the discarded OpenCycleMap tile source by HikeBikeMap.
Currently on CityBikes API, electric bikes seem to be supported on 4 networks only, as evidenced in these files : - pybikes/bicing.py - pybikes/smovengo.py - pybikes/keolis.py - pybikes/smartbike.py It's not clear if it's standard but every one of them use the same architecture : the 'extra' JSON item of a station contains the two following sub-items : - 'has_ebikes' : boolean - 'ebikes' : integer Since on some networks the 'has_bikes' value is computed from the 'ebikes' value being 0 or not 0, only this very data is relevant. This commit add the 'ebikes' data as Station class's attributes as well as stations table's columns (upgrade database to version 2). It's copied from remote object if it exists, otherwise it is null.
This commit handles display of electric bikes by adding an 'ebikes' area to the 'free bikes' and 'empty slots' legacy areas of the GUI. By default this additional area is non visible, and it shows up only if the bike system supports it. In this case, the 'free bikes' area is turned into a 'regular bikes' area : it displays the number of non-electric bikes only, and the icon is replaced by a green one. This update is done on 4 pieces of GUI's code : - StationActivity.java which inflates activity_station.xml - StationsListAdapter.java which inflates station_list_item.xml - MapActivity.java which inflates bonuspack_bubble.xml - StationsListAppWidgetService.java which inflates app_widget_item.xml
fa1f5c9 to
d88b618
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello.
As stated in #45, CityBikes API does support electric bikes. I suggest this integration built on top of #52. Please ask if you have any question with the way it is handled.
Thank you in advance.