-
-
Notifications
You must be signed in to change notification settings - Fork 866
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
Add 'isFilled' field to Polygon class, fix issue with polygons doted border drawing and created example page for Polygons #501
Conversation
The new field 'isFilled' in Polygon class allow you to chose if you want the Polygon to be filled when drawn. When I have adding this I also found that there was an issue with doted borders drawing. The last border was missing, I fixed it (_paintDottedLine method). Also added an example screen for the Polygon Layer.
LGTM - could you take a look at the travis build failures and fix the merge conflicts? |
Alright, I have a lot of stuff going on, I wont be able to fix this before feb 3 |
The conflicts seem resolved, but the Travis CI build (the one in the pull request, not the one you mentioned) fail does not seem to be related to mycode, I did not updated lib/src/layer/tile_provider/tile_provider.dart |
I have checked again and I can't find why the Travis build failed, I ran dartfmt with Android Studio on the whole project, but nothing was updated |
polygon_layer.dart has a new The CI build is failing due to a lint rule |
@Wyseh Can you resolve these conflicts? If not, should we close the PR? |
I'll try to take some time to do it during this week but I currently have a lot of work, if it's not done within this week you can close it |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
Any progress here? Would love to see this feature :) |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
This was a long time ago, but makes sense to me...is this still an issue and a PR that's wanted ? (If so I think you need to repull upstream I think and see if its still ok) |
Still required. When implementing, you maybe think about #972 this as well (Border Color different from filled color) |
Yes, some of the original poly options on that aren't too clear on that for me (maybe that's also a docs issue). I've previously wondered whether the polyline/polygon needs some further development that could be done as a plugin with new options and features (so as not to break the current usage), but maybe that's a good discussion to have. |
Is this going to be merged friends? |
@BaptistePires Can you pull upstream so I can take a look? Thanks! |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
Any progess here? |
Just need @BaptistePires to pull upstream, then ready for review. |
Hi, I've been very busy this year, and I really didn't have time to take care of this, I'll try to get it done by the end of the week. Sorry for the inconvenience. |
No problem! |
I resolved the conflicts but I wasn't able to test it yet, I'll come back as soon as I've tested it. |
It appears not all files are formatted correctly, can you run |
As this PR is quite old, I'll have to update my code to make it work with new attributes and methods. As I said above, I wasn't able to test it yet, I'll do this as soon as I can. |
I was able to test it and it's working on my device |
Thanks, I'll test it soon as well, and hopefully I can merge. |
I am testing right now. Quick question, did you have problems compiling the example app for Android? I don't think it's your fault, but I can't do it for some reason. (I've noticed it before as well.) Using web for now. |
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.
LGTM. I'm not sure why the Android app isn't compiling for me, but that can be fixed for another time.
Will merge now. Thanks for your contribution!
Yes I had issues related to the minSdkVersion iirc, I thought it was because my environment was a bit old. |
@JaffaKetchup While upgrading this package from 0.14.0 to 1.0.0, we found out that our polygons weren't filled anymore by default. Perhaps it could be helpful to add this to the changelog or change the default value of |
Yes, good spot. I don't think we should change this now though. Updating to 1.0.0 should be ok to have breaking changes..it just shouldn't have had a change before that, and I guess changing it back will introduce a breaking change again when there shouldn't be any :D. (I think I sound as clear as mud on that). It should get added to changelog though (and we should try and watch out for things like that in the future better). |
Yeah when I was doing the changeling I did include this change but didn't completely specify it. I'll add it to the migration instructions in the new docs. |
Hello,
First of all, thanks for this awesome package, I find it really usefull.
I added a new field in the Polygon class to allow users to fill or not the polygon, it's called
isFilled
(by default it's false, so it wont change the behavior of current applications that may be working with Polygons) and it's checked in thePolygonPainter
class :When I was doing that, I found that when I was drawing polygons with doted borders, the
last one was not doted, I fixed that by updating the method
_paintDottedLine
,I only updated those lines :
for (var i = 0; i < offsets.length - 1; i++){
var o0 = offsets[i];
var o1 = offsets[i + 1];
Now it's :
for (var i = 0; i < offsets.length; i++){
var o0 = offsets[i % offsets.length];
var o1 = offsets[(i + 1) % offsets.length];
Thank's to that, when it's
i + 1
it takesoffsets[0]
and draw the line between the last and the first point.I also added an example page for the polygon as there was not.
Here are some screenshots to explain what I said :
If you need any other information, I'll provide it.
Thanks for reading !