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

Skip to content

Conversation

tonnyavery
Copy link
Contributor

Solves #448 by using Color.parseColor to correctly support hex color strings for lines

Solves #762 by interpreting and setting geometry on the line, allowing to programmatically move lines

…upport hex color strings for lines

Solves flutter-mapbox-gl#762 by interpreting and setting geometry on the line, allowing to programmatically move lines
@tonnyavery
Copy link
Contributor Author

@felix-ht I see that fill also doesn't interpret geometry when updating so moving the fill layer doesn't seem to work for me on iOS.
Should we do there something similar to what I have in this PR for line?

@felix-ht
Copy link
Collaborator

@AAverin doing the same for fills would be a good idea as well

felix-ht
felix-ht previously approved these changes Nov 19, 2021

if let geometry = options["geometry"] as? [[Double]], geometry.count > 0 {
var coordinates: [CLLocationCoordinate2D] = []
class func getCoordinates(options: Any?) -> [CLLocationCoordinate2D] {
Copy link
Collaborator

@felix-ht felix-ht Nov 19, 2021

Choose a reason for hiding this comment

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

rename this to something like getLineCoordinates

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was wondering if same code can be later reused for other annotations like Circle or Fill. But you're right, in this PR getLineCoordinates probably makes more sense

Copy link
Collaborator

Choose a reason for hiding this comment

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

hmm it could be indeed be reused for polygons (not for circles or symbols tho) so the name is probably fine!

@felix-ht felix-ht dismissed their stale review November 19, 2021 20:23

wrong button


if let geometry = options["geometry"] as? [[Double]], geometry.count > 0 {
var coordinates: [CLLocationCoordinate2D] = []
class func getCoordinates(options: Any?) -> [CLLocationCoordinate2D] {
Copy link
Collaborator

Choose a reason for hiding this comment

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

hmm it could be indeed be reused for polygons (not for circles or symbols tho) so the name is probably fine!

@tobrun tobrun merged commit 9a07be7 into flutter-mapbox-gl:master Nov 20, 2021
m0nac0 added a commit to maplibre/flutter-maplibre-gl that referenced this pull request May 15, 2022
https: //github.com/flutter-mapbox-gl/maps/pull/776
Co-Authored-By: Anton Averin <[email protected]>
m0nac0 added a commit to maplibre/flutter-maplibre-gl that referenced this pull request May 15, 2022
Cherry-pick upstream#776

https: //github.com/flutter-mapbox-gl/maps/pull/776

Co-Authored-By: Anton Averin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants