Skip to content
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

[FEATURE] Reintroduce keys on Polygons #1657

Closed
sirkalmi opened this issue Sep 20, 2023 · 4 comments
Closed

[FEATURE] Reintroduce keys on Polygons #1657

sirkalmi opened this issue Sep 20, 2023 · 4 comments
Labels
feature This issue requests a new feature P: 3 (low) (Default priority for feature requests)

Comments

@sirkalmi
Copy link

What do you want implemented?

As a reminder, the 3.1.0 changelog:

[3.1.0] - 2022/12/21
Contains the following additions/removals:

...
Added Keys to Polygons, Polylines, and CircleMarkers - #1402 & #1403
...

What can be used instead if I want to assign an arbitrary object? I want to read it as a result of the onTap event.

What other alternatives are available?

No response

Can you provide any other information?

No response

Severity

Annoying: Currently have to use workarounds

@sirkalmi sirkalmi added feature This issue requests a new feature P: 3 (low) (Default priority for feature requests) labels Sep 20, 2023
@JaffaKetchup
Copy link
Member

This appears to have been removed in 86a080c. Not sure why, will need to investigate.

@JaffaKetchup
Copy link
Member

There should be methods that don't use keys. For example, I'm not sure how you're building the list of Polygons, but you should be able to get a 'key' from a list, for example by mapping the list - but there might be more performant ways.

@JaffaKetchup JaffaKetchup changed the title [FEATURE] The 4.0.0 version lost the key property introduced in version 3.1.0 without any mention. [FEATURE] Reintroduce keys on Polygons Oct 20, 2023
@josxha
Copy link
Contributor

josxha commented Nov 26, 2023

I don't think it makes sense to add a key property to the Polygon class as long as it isn't used by flutter_map internally.

@sirkalmi if you need custom properties, you can extend from Polygon and add all custom properties to the polygon that you need:

class MyPolygon extends Polygon {
  final Key key;

  MyPolygon({required this.key, required super.points});
}

Voting to close this issue as not planned.

@sirkalmi
Copy link
Author

I don't think it makes sense to add a key property to the Polygon class as long as it isn't used by flutter_map internally.

@sirkalmi if you need custom properties, you can extend from Polygon and add all custom properties to the polygon that you need:

class MyPolygon extends Polygon {
  final Key key;

  MyPolygon({required this.key, required super.points});
}

Voting to close this issue as not planned.

Thanks for the tip, that's how I solved the problem.

@josxha josxha closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue requests a new feature P: 3 (low) (Default priority for feature requests)
Projects
None yet
Development

No branches or pull requests

3 participants