-
Notifications
You must be signed in to change notification settings - Fork 119
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
Building plugin #26
Building plugin #26
Conversation
78020b1
to
04ccb4e
Compare
I finished the initial stab and this PR is ready for review. Possible API to add:
|
@tobrun Agreed. I think an API for the three different values you set on https://github.com/mapbox/mapbox-plugins-android/pull/26/files#diff-a1a6e9c8cc422ca880b018bba0a5741cR101 ( |
2f63028
to
f994a2c
Compare
I have added the API and reworked the code to reflect this. This PR is ready for review, though we should maybe wait with merging until v5.1.0 final is released? |
👍 Makes sense to me to wait until the underlying API gets stable and published to release 0.1.0. Meanwhile, I suggest we start publishing SNAPSHOTs of the plugin so that interested devs can start playing with it. |
This PR has been updated with latest SDK release and adds Light integration (just a setter for now) |
dbf9674
to
662f33d
Compare
Checkstyle strikes again 😆 |
@BindView(R.id.fabBuilding) | ||
View fab; | ||
|
||
@BindView(R.id.seekbar_light_radialCoordinate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
half resources use camel casing, the rest use snake
plugins/building/gradle.properties
Outdated
@@ -0,0 +1,4 @@ | |||
POM_ARTIFACT_ID=mapbox-android-building-plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep consistency around plugins, the artifact id should be mapbox-android-plugin-building
plugins/building/gradle.properties
Outdated
@@ -0,0 +1,4 @@ | |||
POM_ARTIFACT_ID=mapbox-android-building-plugin | |||
POM_NAME=Mapbox Android Plugins | |||
POM_DESCRIPTION=Mapbox Android Plugins (Building) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mapbox Android Building Plugin
plugins/building/proguard-rules.pro
Outdated
@@ -0,0 +1,25 @@ | |||
# Add project specific ProGuard rules here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file can be deleted?
Went ahead and fixed the issues I raised previously. One thing I noticed is that we use Another addition that should be made in this PR would be the zoom function modifies the building height so they don't just pop in. |
If this is supported across different styles, we should make sure everything is being redrawn correctly when styles change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor feedback.
plugins/build.gradle
Outdated
@@ -10,6 +10,7 @@ buildscript { | |||
allprojects { | |||
repositories { | |||
jcenter() | |||
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this needed for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover from when we were using map SDK snapshot I think. I removed it.
} | ||
|
||
private void initLightSeekbar() { | ||
seekbarRadialCoordinate.setMax(24); // unknown? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does unknown
mean in this context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobrun could speak more on this, I'm not sure either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what the maximum radius is for a light source, refs https://en.wikipedia.org/wiki/Spherical_coordinate_system
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a note on code mentioning this?
|
||
@Override | ||
public void onStartTrackingTouch(SeekBar seekBar) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a comment or a Timber call in the unused methods to explicitly note they aren't used on purpose?
# This is the 1st commit message: add Building plugin # The commit message #2 will be skipped: # fixed issues reviewed by me # The commit message #3 will be skipped: # fixed bitrise script # The commit message #4 will be skipped: # added DDS for building height # The commit message #5 will be skipped: # removed commented out code
33ca38c
to
a689a33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's 🏛 this.
} | ||
|
||
private void initLightSeekbar() { | ||
seekbarRadialCoordinate.setMax(24); // unknown? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a note on code mentioning this?
This PR adds a Building plugin, this plugin API matches Traffic plugin API.