Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[google_maps_flutter] Widget based polyline support for google maps. #1049

Merged
merged 75 commits into from Apr 10, 2019

Conversation

awazgyawali
Copy link
Contributor

@awazgyawali awazgyawali commented Jan 8, 2019

PR to support polyline on both Android and IOS.

UPDATE: Mar 9, 2019

This PR initially was a controller based support. As the flutter team has added widget based marker support, so I also added the same widget based support for the polyline.

If you want to use controller-based polyline support use the following

 google_maps_flutter: 
    git:
      url: git://github.com/awazgyawali/plugins/
      path: packages/google_maps_flutter
      ref: cd06409

and if you want to use the widget based solution use the following.

  google_maps_flutter:
      git:
        url: git://github.com/awazgyawali/plugins/
        path: packages/google_maps_flutter
        ref: google_maps_polyline

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@awazgyawali awazgyawali changed the title Google maps polyline Google maps polyline support Jan 8, 2019
@awazgyawali
Copy link
Contributor Author

@irevans Can you sign the CLA agreement anytime soon? I think you were about to confirm it from your employer.

@ZatacaSystems
Copy link

@irevans Can you sign the CLA agreement anytime soon? I think you were about to confirm it from your employer.

@irevans Any news about this?

@irevans
Copy link

irevans commented Jan 16, 2019

@awazgyawali I'm still waiting on my employer to sign the cla, it's shouldn't take much longer, I'm chasing it up regularly.

When you added the iOS support I was wondering whether you took a look at the flutter code. I'm interested in whether you think using null to represent the default pattern in the PolylineOptions class is a good idea. Perhaps using an empty list would be better, such that null is used to consistently mean "do not change this configuration option".

@awazgyawali
Copy link
Contributor Author

Never noticed that coz IOS sdk for google maps doesn't seem to have support for patterns out of the box nor start cap and end cap, so I didn't look at the pattern code.

However I found this “Dotted Polylines with Google Maps SDK for iOS” by Dylan Maryk https://link.medium.com/bjo68I3AwT just now.

I might have to look at this and your work to implement pattern for android to check if they match or not.

@irevans
Copy link

irevans commented Jan 16, 2019

@awazgyawali I'm going to running the iOS version of the sample application. Where is the google maps API KEY specified on the iOS side?

@iskakaushik
Copy link
Contributor

@awazgyawali looks like some of the functionality is still missing on the iOS side, caps, joints etc. Do you plan on adding it?

@awazgyawali
Copy link
Contributor Author

awazgyawali commented Apr 10, 2019

@iskakaushik I am aware of the missing features. I was planning to cap feature on IOS but haven't found a way to actually change the cap. Also for the joints, the SDKs seems to provide different kind of methods on the IOS side. Not sure how we should use them.

On android it has PatternItem but on IOS it has Spans. I think we can use spans too to make the gap behavior work by using transparent color. IOS documentation for spans are here.

@iskakaushik
Copy link
Contributor

@awazgyawali ah, i see. I made the example more obvious to account for that. I also added some dart doc on the fields that are currently supported on Android only. We can add some version of translation from patterns to spans on iOS. I do not think that should block this PR.

[experimental] Plugins PR tracking automation moved this from Waiting for author to Waiting to land Apr 10, 2019
@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

@iskakaushik
Copy link
Contributor

For CLA, i've manually verified that the only committers are:

Author: Aawaz Gyawali <awazgyawali@gmail.com>
Author: EVANS, Ian 3 <Ian.Evans3@admiralgroup.co.uk>
Author: Ian Evans <ian.evans3@admiralgroup.co.uk>
Author: Kaushik Iska <kaushikiska@google.com>

My suspicion is that the bot is not case insensitive. Overriding the CLA check.

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

@iskakaushik iskakaushik merged commit af27685 into flutter:master Apr 10, 2019
[experimental] Plugins PR tracking automation moved this from Waiting to land to Done Apr 10, 2019
@irevans
Copy link

irevans commented Apr 11, 2019

@iskakaushik would I be right in thinking that only the user that opened the PR gets contribution credit for this work?

@iskakaushik
Copy link
Contributor

@irevans , i'm not sure what you mean by contribution credit. I will check with my team and let you know. If there is some explicit credit, i'll make sure that you get it as well.

@irevans
Copy link

irevans commented Apr 12, 2019

@iskakaushik I was referring to githubs recognition that a user is a contributor to a project. I found this in GitHub's documentation here:

"When a pull request is merged and commits are squashed, only the user that merged the pull request and the user that opened the pull request receive contribution credit. No other contributors to the pull request will receive contribution credit."

In which case I'm guessing there is nothing you can do about that. Thanks in any case.

@stevenspiel
Copy link

@awazgyawali Have you given thought to Polygon support? Do you think they could coexist? Structurally, what makes the most sense to you?

  • An abstract Polyshape class that Polyline and Polygon both implement
  • A Polyshape object with an enclosed bool option (polygons would also need a fillColor param)
  • Handle them separately by duplicating Polyline code and adjusting where needed to allow for polygon support

I'd love to know your thoughts on it.

@thiagotalma
Copy link

Is it possible to use an encoded string as a path?
(https://developers.google.com/maps/documentation/utilities/polylinealgorithm)

@debkanchan
Copy link

debkanchan commented Jun 18, 2019

Is it possible to use an encoded string as a path?
(https://developers.google.com/maps/documentation/utilities/polylinealgorithm)

Yes, you just need to have a decoder function. I have one because I use the directions api to do exactly this. let me put it up on a gist.

Edit: here it is https://gist.github.com/DebkanchanSamadder/b428e052279b7124b8edb974536f47f9

@SDRuiz
Copy link

SDRuiz commented Jul 15, 2019

Can I ask some questions regarding the google_maps_flutter polylines? because in the flutter-dev groups noone answer.
Thanks!

Q: https://groups.google.com/forum/#!topic/flutter-dev/QX4CKNKQOrw

julianscheel pushed a commit to jusst-engineering/plugins that referenced this pull request Mar 11, 2020
@awazgyawali awazgyawali deleted the google_maps_polyline branch November 27, 2023 16:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
No open projects