This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[google_maps_flutter] Add heatmap support #5274
[google_maps_flutter] Add heatmap support #5274
Changes from 78 commits
f2e9806
2203401
bcc8f07
b179c93
6ee7ae8
7f78965
09c1fab
d5d0726
cf29213
b2436f5
37c58ad
789cd9a
977dfd4
d27c28c
2df83b5
efb432a
5703eeb
c47d213
2361e47
72dd326
bc27137
146ea54
5ed26a8
bd51355
876998f
d4b3524
f6d3050
8415953
0a9495c
65bad90
319f84e
b2e7e5e
9cb30af
5039dd1
177def0
ca94502
6ee5fed
d341949
c3e904f
5cd2524
7ad6e7b
7978892
d76e161
dd3c82f
f89a3f4
994fd1f
f96f844
3c6c7cd
f63af88
1160e32
c41b00a
ead58b8
d1a8856
5c78283
b9dd462
d1daad1
35d8715
ccc9ca2
ea1975b
d39a901
89239ab
e5b4943
3c7d7dc
011828d
c39446b
4999d14
681eae8
0bf8dd2
d011011
b7f4f72
906c3f0
09467d1
a5e1e5f
686b60a
70c8dbe
4eaa5d3
b9d33cd
882d3b4
9005231
0c03dad
6d69bed
edcede1
cd24b9e
e67b408
f4d5c86
2f745ab
1ce1595
b2be041
60e15ea
612e5be
7c22792
1d212eb
f1105ad
ef7a9d4
8c7c8f0
43ba954
3928a72
4d6392b
5c8839e
c187469
feeed2c
e7471ea
e779c77
aab722a
e08a292
20591b0
5235dad
55988cc
e6e1af2
28468b2
35d12bd
5c8ce27
597d065
115ed7f
b3e1d4a
38ec627
3639957
89a0e20
88db9ca
34deb7d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can you explain a bit more about this? If every client of the plugin would need to do a workaround like this, we should try to figure out how to handle it within the plugin itself.
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.
It actually looks like this got fixed for Android, but web still has the issue.
Javascript example: https://developers.google.com/maps/documentation/javascript/examples/layer-heatmap
Android example: https://developers.google.com/maps/documentation/android-sdk/utility/heatmap
iOS example: https://developers.google.com/maps/documentation/ios-sdk/utility/heatmap
Web without the fix looks like this (Android used to do something similar):
![Screen Shot 2022-10-19 at 1 24 49 PM](https://user-images.githubusercontent.com/7896519/196762086-252fd4f9-aa70-43fc-a31c-f69542c83e27.png)
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.
Again since this behavior has changed since the last time I checked I'm not sure I'm comfortable creating a built in workaround
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.
Is this a Flutter vs native unit issue? If so, we should be handling it internally.
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.
Almost everything in this plugin relating to the size of something behaves completely differently on web vs android/ios. I'm not sure what the best solution here is.
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.
Can you elaborate on "completely differently"? We'll need to understand what exactly the differences are to figure out how to accommodate them in the API.
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.
With the most recent merge even Android/iOS behave differently from each other:
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.
The fact that this behavior has changed makes me hesitant to create a built in workaround for this issue. I'm not sure we can trust the platform SDKs to keep consistent behavior.
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 thought maybe this had something to do with device pixel ratio, but accounting for that seems to have just made things worse
The code to get the radius:
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.
Do the native SDKs document what the units of the radius are supposed to be?
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.
https://developers.google.com/maps/documentation/javascript/heatmaplayer
https://developers.google.com/maps/documentation/ios-sdk/utility/heatmap
https://developers.google.com/maps/documentation/android-sdk/utility/heatmap
They all say the unit is "pixels" which seems like a lie unless something funky is going on