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

[google_maps_flutter] Add heatmap support #5274

Closed
wants to merge 120 commits into from
Closed
Show file tree
Hide file tree
Changes from 78 commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
f2e9806
Worked on platform interface
Rexios80 Apr 13, 2022
2203401
Added heatmap layer code to web
Rexios80 Apr 14, 2022
bcc8f07
Added web target to example
Rexios80 Apr 14, 2022
b179c93
Worked on interface
Rexios80 Apr 14, 2022
6ee7ae8
Worked on Android implementation
Rexios80 Apr 14, 2022
7f78965
Refactoring
Rexios80 Apr 14, 2022
09c1fab
Android works
Rexios80 Apr 14, 2022
d5d0726
Merge branch 'master' into feature/google-maps-heatmap
Rexios80 Apr 14, 2022
cf29213
Java formatting
Rexios80 Apr 14, 2022
b2436f5
Fixed dart analysis
Rexios80 Apr 15, 2022
37c58ad
Added copyright text
Rexios80 Apr 15, 2022
789cd9a
Web tests
Rexios80 Apr 16, 2022
977dfd4
Heatmap updates test
Rexios80 Apr 16, 2022
d27c28c
Gradient works
Rexios80 Apr 17, 2022
2df83b5
Merge remote-tracking branch 'origin/master' into feature/google-maps…
Rexios80 Apr 18, 2022
efb432a
Example app now launches with Google-Maps-iOS-Utils included
Rexios80 Apr 18, 2022
5703eeb
Worked on ios implementation
Rexios80 Apr 18, 2022
c47d213
iOS kind of works; the gradient is being weird
Rexios80 Apr 19, 2022
2361e47
Merge branch 'flutter:main' into feature/google-maps-heatmap
Rexios80 Apr 19, 2022
72dd326
Merge remote-tracking branch 'origin/feature/google-maps-heatmap' int…
Rexios80 Apr 19, 2022
bc27137
Fixed gradient issue
Rexios80 Apr 19, 2022
146ea54
Only use 0 alpha gradient first color on web
Rexios80 Apr 19, 2022
5ed26a8
Ran clang-format
Rexios80 Apr 19, 2022
bd51355
Ran flutter format
Rexios80 Apr 19, 2022
876998f
iOS heatmap rendering is a lot better
Rexios80 Apr 19, 2022
d4b3524
Formatting
Rexios80 Apr 19, 2022
f6d3050
Merge branch 'flutter:main' into feature/google-maps-heatmap
Rexios80 Apr 26, 2022
8415953
Made WeightedLatLng extend LatLng
Rexios80 Apr 26, 2022
0a9495c
Resolved issues
Rexios80 Apr 26, 2022
65bad90
Fixed web code issue
Rexios80 Apr 26, 2022
319f84e
Resolved issues
Rexios80 Apr 26, 2022
b2e7e5e
Added heatmap controller to umbrella header
Rexios80 Apr 26, 2022
9cb30af
Made min/max zoom intensity configurable from flutter
Rexios80 Apr 26, 2022
5039dd1
Made start points and color map size configurable from flutter
Rexios80 Apr 27, 2022
177def0
dart formatting
Rexios80 Apr 27, 2022
ca94502
Fixed test code
Rexios80 Apr 27, 2022
6ee5fed
Merge branch 'master' into feature/google-maps-heatmap
Rexios80 Apr 28, 2022
d341949
Better use of null safety
Rexios80 May 1, 2022
c3e904f
Added web heatmaps tests
Rexios80 May 3, 2022
5cd2524
Merge branch 'master' into feature/google-maps-heatmap
Rexios80 May 3, 2022
7ad6e7b
Fixed web tests
Rexios80 May 3, 2022
7978892
Fixed another web test issue
Rexios80 May 3, 2022
d76e161
Got NSAssert working
Rexios80 May 4, 2022
dd3c82f
Removed incorrect doc comment
Rexios80 May 5, 2022
f89a3f4
Merge remote-tracking branch 'origin/master' into feature/google-maps…
Rexios80 May 10, 2022
994fd1f
Fixed analysis issues with HeatmapPage in example
Rexios80 May 10, 2022
f96f844
Merge remote-tracking branch 'origin/master' into feature/google-maps…
Rexios80 May 21, 2022
3c6c7cd
Fixed analysis issues
Rexios80 May 21, 2022
f63af88
Formatting
Rexios80 May 21, 2022
1160e32
Fixed issues
Rexios80 May 21, 2022
c41b00a
Merge remote-tracking branch 'origin/master' into feature/google-maps…
Rexios80 May 23, 2022
ead58b8
Added license text to example/web/index.html
Rexios80 May 23, 2022
d1a8856
Merge remote-tracking branch 'origin/master' into feature/google-maps…
Rexios80 May 23, 2022
5c78283
Merge branch 'google_map_clean_up' into feature/google-maps-heatmap
Rexios80 Jun 15, 2022
b9dd462
Merge branch 'master' into feature/google-maps-heatmap
Rexios80 Jun 15, 2022
d1daad1
Formatting
Rexios80 Jun 15, 2022
35d8715
Don't know where that came from but okay
Rexios80 Jun 15, 2022
ccc9ca2
iOS example changes
Rexios80 Jun 16, 2022
ea1975b
Added iOS JSON conversion tests
Rexios80 Jun 16, 2022
d39a901
Merge branch 'main' into feature/google-maps-heatmap
Rexios80 Jul 11, 2022
89239ab
Fixed issues
Rexios80 Jul 14, 2022
e5b4943
Refactored heatmap controllers
Rexios80 Jul 14, 2022
3c7d7dc
Merge branch 'main' into feature/google-maps-heatmap
Rexios80 Jul 14, 2022
011828d
Added swift version to podspec for CI
Rexios80 Jul 14, 2022
c39446b
Removed `use_modular_headers!` from Podfile
Rexios80 Jul 15, 2022
4999d14
Merge branch 'master' into feature/google-maps-heatmap
Rexios80 Aug 16, 2022
681eae8
Fixed missing things
Rexios80 Aug 16, 2022
0bf8dd2
Fixed issues
Rexios80 Aug 17, 2022
d011011
Xcode project file changes
Rexios80 Aug 17, 2022
b7f4f72
Formatting
Rexios80 Aug 17, 2022
906c3f0
Merge branch 'master' into feature/google-maps-heatmap
Rexios80 Aug 17, 2022
09467d1
Reverted changes to other packages
Rexios80 Aug 17, 2022
a5e1e5f
Fixed umbrella header
Rexios80 Aug 17, 2022
686b60a
Formatting
Rexios80 Aug 17, 2022
70c8dbe
Fixed issues
Rexios80 Aug 17, 2022
4eaa5d3
Reverted changes to pbxproj file
Rexios80 Aug 17, 2022
b9d33cd
Merge branch 'main' into feature/google-maps-heatmap
Rexios80 Aug 18, 2022
882d3b4
Merge branch 'main' into feature/google-maps-heatmap
Rexios80 Aug 18, 2022
9005231
Fixes
Rexios80 Sep 1, 2022
0c03dad
Fixes
Rexios80 Sep 1, 2022
6d69bed
Fixes
Rexios80 Sep 1, 2022
edcede1
Fixes
Rexios80 Sep 1, 2022
cd24b9e
Merge remote-tracking branch 'origin/master' into feature/google-maps…
Rexios80 Sep 7, 2022
e67b408
Merge branch 'master' into feature/google-maps-heatmap
Rexios80 Oct 17, 2022
f4d5c86
Fixed build issues
Rexios80 Oct 17, 2022
2f745ab
Fixed web test issues
Rexios80 Oct 17, 2022
1ce1595
Fixed analysis issues
Rexios80 Oct 17, 2022
b2be041
iOS build changes
Rexios80 Oct 18, 2022
60e15ea
Updated example
Rexios80 Oct 19, 2022
612e5be
Updated documentation
Rexios80 Oct 19, 2022
7c22792
Removed assertion for radius value
Rexios80 Oct 19, 2022
1d212eb
Fixed building in google_maps_flutter_ios/example
Rexios80 Oct 19, 2022
f1105ad
Formatting
Rexios80 Oct 19, 2022
ef7a9d4
Fixed android build issue
Rexios80 Oct 21, 2022
8c7c8f0
Merge remote-tracking branch 'origin/master' into feature/google-maps…
Rexios80 Oct 24, 2022
43ba954
Merge branch 'master' into feature/google-maps-heatmap
Rexios80 Dec 20, 2022
3928a72
Assert that heatmap data is not empty
Rexios80 Jan 1, 2023
4d6392b
Merge remote-tracking branch 'origin/master' into feature/google-maps…
Rexios80 Jan 12, 2023
5c8839e
Revert "Assert that heatmap data is not empty"
Rexios80 Jan 12, 2023
c187469
Working on testing
Rexios80 Jan 12, 2023
feeed2c
Refactoring
Rexios80 Jan 12, 2023
e7471ea
Wrote some dart code
Rexios80 Jan 12, 2023
e779c77
Working on integration tests
Rexios80 Jan 12, 2023
aab722a
Fixing things
Rexios80 Jan 12, 2023
e08a292
Test passes
Rexios80 Jan 12, 2023
20591b0
Working on test
Rexios80 Jan 12, 2023
5235dad
Added heatmaps update test
Rexios80 Jan 12, 2023
55988cc
Added remove heatmaps test
Rexios80 Jan 12, 2023
e6e1af2
Working on Android tests
Rexios80 Jan 12, 2023
28468b2
Android tests work
Rexios80 Jan 12, 2023
35d12bd
Formatting
Rexios80 Jan 12, 2023
5c8ce27
Uncommented other tests
Rexios80 Jan 12, 2023
597d065
Merge remote-tracking branch 'origin/master' into feature/google-maps…
Rexios80 Jan 27, 2023
115ed7f
Undoing unnecessary changes to example
Rexios80 Jan 27, 2023
b3e1d4a
Rewrite tests using `moreOrLessEquals`
Rexios80 Jan 27, 2023
38ec627
Fixing issues
Rexios80 Jan 27, 2023
3639957
Updated documentation
Rexios80 Jan 30, 2023
89a0e20
Platform-specific serialization
Rexios80 Jan 30, 2023
88db9ca
...
Rexios80 Jan 30, 2023
34deb7d
Merge remote-tracking branch 'origin/master' into feature/google-maps…
Rexios80 Feb 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.2.0

* Adds support for heatmap layers.

## 2.1.12

Expand Down
28 changes: 25 additions & 3 deletions packages/google_maps_flutter/google_maps_flutter/example/.metadata
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
# This file should be version controlled.
Rexios80 marked this conversation as resolved.
Show resolved Hide resolved

version:
revision: 3ea4d06340a97a1e9d7cae97567c64e0569dcaa2
channel: beta
revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
channel: stable

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
- platform: web
create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
4510D964F3B1259FEDD3ABA6 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7755F8F4BABC3D6A0BD4048B /* libPods-Runner.a */; };
4A097997B7B27CE82FFC3AB8 /* libPods-RunnerUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DC8ED0578E8D540BBDA17645 /* libPods-RunnerUITests.a */; };
Rexios80 marked this conversation as resolved.
Show resolved Hide resolved
6851F3562835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6851F3552835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m */; };
68E4726A2836FF0C00BDDDAC /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68E472692836FF0C00BDDDAC /* MapKit.framework */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
Expand All @@ -21,7 +20,6 @@
982F2A6C27BADE17003C81F4 /* PartiallyMockedMapView.m in Sources */ = {isa = PBXBuildFile; fileRef = 982F2A6B27BADE17003C81F4 /* PartiallyMockedMapView.m */; };
F7151F13265D7ED70028CB91 /* GoogleMapsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F7151F12265D7ED70028CB91 /* GoogleMapsTests.m */; };
F7151F21265D7EE50028CB91 /* GoogleMapsUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = F7151F20265D7EE50028CB91 /* GoogleMapsUITests.m */; };
FC8F35FC8CD533B128950487 /* libPods-RunnerTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F267F68029D1A4E2E4C572A7 /* libPods-RunnerTests.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -60,8 +58,6 @@
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
6851F3552835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLTGoogleMapJSONConversionsConversionTests.m; sourceTree = "<group>"; };
68E472692836FF0C00BDDDAC /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/System/iOSSupport/System/Library/Frameworks/MapKit.framework; sourceTree = DEVELOPER_DIR; };
6AC1E6095B09DE4B02ECF64E /* Pods-RunnerUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerUITests/Pods-RunnerUITests.release.xcconfig"; sourceTree = "<group>"; };
733AFAB37683A9DA7512F09C /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
7755F8F4BABC3D6A0BD4048B /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
Expand All @@ -77,11 +73,7 @@
982F2A6A27BADE17003C81F4 /* PartiallyMockedMapView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PartiallyMockedMapView.h; sourceTree = "<group>"; };
982F2A6B27BADE17003C81F4 /* PartiallyMockedMapView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PartiallyMockedMapView.m; sourceTree = "<group>"; };
B7AFC65E3DD5AC60D834D83D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
DC8ED0578E8D540BBDA17645 /* libPods-RunnerUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RunnerUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
DDDAC1342ABDF2F125577581 /* Pods-RunnerUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerUITests/Pods-RunnerUITests.debug.xcconfig"; sourceTree = "<group>"; };
E52C6A6210A56F027C582EF9 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
EA0E91726245EDC22B97E8B9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
F267F68029D1A4E2E4C572A7 /* libPods-RunnerTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RunnerTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
F7151F10265D7ED70028CB91 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
F7151F12265D7ED70028CB91 /* GoogleMapsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsTests.m; sourceTree = "<group>"; };
F7151F14265D7ED70028CB91 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand All @@ -104,15 +96,13 @@
buildActionMask = 2147483647;
files = (
68E4726A2836FF0C00BDDDAC /* MapKit.framework in Frameworks */,
FC8F35FC8CD533B128950487 /* libPods-RunnerTests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F7151F1B265D7EE50028CB91 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
4A097997B7B27CE82FFC3AB8 /* libPods-RunnerUITests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -124,8 +114,6 @@
children = (
68E472692836FF0C00BDDDAC /* MapKit.framework */,
7755F8F4BABC3D6A0BD4048B /* libPods-Runner.a */,
F267F68029D1A4E2E4C572A7 /* libPods-RunnerTests.a */,
DC8ED0578E8D540BBDA17645 /* libPods-RunnerUITests.a */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -193,10 +181,6 @@
children = (
B7AFC65E3DD5AC60D834D83D /* Pods-Runner.debug.xcconfig */,
EA0E91726245EDC22B97E8B9 /* Pods-Runner.release.xcconfig */,
E52C6A6210A56F027C582EF9 /* Pods-RunnerTests.debug.xcconfig */,
733AFAB37683A9DA7512F09C /* Pods-RunnerTests.release.xcconfig */,
DDDAC1342ABDF2F125577581 /* Pods-RunnerUITests.debug.xcconfig */,
6AC1E6095B09DE4B02ECF64E /* Pods-RunnerUITests.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
Expand Down Expand Up @@ -251,7 +235,6 @@
isa = PBXNativeTarget;
buildConfigurationList = F7151F19265D7ED70028CB91 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
D067548A17DC238B80D2BD12 /* [CP] Check Pods Manifest.lock */,
F7151F0C265D7ED70028CB91 /* Sources */,
F7151F0D265D7ED70028CB91 /* Frameworks */,
F7151F0E265D7ED70028CB91 /* Resources */,
Expand All @@ -270,7 +253,6 @@
isa = PBXNativeTarget;
buildConfigurationList = F7151F25265D7EE50028CB91 /* Build configuration list for PBXNativeTarget "RunnerUITests" */;
buildPhases = (
BD39F60794E9A0264D5D3752 /* [CP] Check Pods Manifest.lock */,
F7151F1A265D7EE50028CB91 /* Sources */,
F7151F1B265D7EE50028CB91 /* Frameworks */,
F7151F1C265D7EE50028CB91 /* Resources */,
Expand Down Expand Up @@ -422,50 +404,6 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
BD39F60794E9A0264D5D3752 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RunnerUITests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
D067548A17DC238B80D2BD12 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -686,7 +624,6 @@
};
F7151F17265D7ED70028CB91 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = E52C6A6210A56F027C582EF9 /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
Expand All @@ -702,7 +639,6 @@
};
F7151F18265D7ED70028CB91 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 733AFAB37683A9DA7512F09C /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
Expand All @@ -718,7 +654,6 @@
};
F7151F26265D7EE50028CB91 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = DDDAC1342ABDF2F125577581 /* Pods-RunnerUITests.debug.xcconfig */;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = RunnerUITests/Info.plist;
Expand All @@ -732,7 +667,6 @@
};
F7151F27265D7EE50028CB91 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 6AC1E6095B09DE4B02ECF64E /* Pods-RunnerUITests.release.xcconfig */;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = RunnerUITests/Info.plist;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1320"
LastUpgradeVersion = "1300"
Rexios80 marked this conversation as resolved.
Show resolved Hide resolved
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// ignore_for_file: public_member_api_docs

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_flutter_example/page.dart';

class HeatmapPage extends GoogleMapExampleAppPage {
const HeatmapPage({Key? key})
: super(const Icon(Icons.map), 'Heatmaps', key: key);

@override
Widget build(BuildContext context) {
return const HeatmapBody();
}
}

class HeatmapBody extends StatefulWidget {
const HeatmapBody({Key? key}) : super(key: key);

@override
State<StatefulWidget> createState() => HeatmapBodyState();
}

class HeatmapBodyState extends State<HeatmapBody> {
static const LatLng sanFrancisco = LatLng(37.774546, -122.433523);

List<WeightedLatLng> enabledPoints = <WeightedLatLng>[
const WeightedLatLng(37.782, -122.447),
const WeightedLatLng(37.782, -122.445),
const WeightedLatLng(37.782, -122.443),
const WeightedLatLng(37.782, -122.441),
const WeightedLatLng(37.782, -122.439),
const WeightedLatLng(37.782, -122.437),
const WeightedLatLng(37.782, -122.435),
const WeightedLatLng(37.785, -122.447),
const WeightedLatLng(37.785, -122.445),
const WeightedLatLng(37.785, -122.443),
const WeightedLatLng(37.785, -122.441),
const WeightedLatLng(37.785, -122.439),
const WeightedLatLng(37.785, -122.437),
const WeightedLatLng(37.785, -122.435)
];

List<WeightedLatLng> disabledPoints = <WeightedLatLng>[];

void _addPoint() {
if (disabledPoints.isEmpty) {
return;
}

final WeightedLatLng point = disabledPoints.first;
disabledPoints.removeAt(0);

setState(() => enabledPoints.add(point));
}

void _removePoint() {
if (enabledPoints.isEmpty) {
return;
}

final WeightedLatLng point = enabledPoints.first;
enabledPoints.removeAt(0);

setState(() => disabledPoints.add(point));
}

@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Center(
child: SizedBox(
width: 350.0,
height: 300.0,
child: GoogleMap(
initialCameraPosition: const CameraPosition(
target: sanFrancisco,
zoom: 13,
),
heatmaps: <Heatmap>{
Heatmap(
heatmapId: const HeatmapId('test'),
data: enabledPoints,
gradient: HeatmapGradient(
colors: <Color>[
// Web and Android need a first color with 0 alpha.
// On iOS, this causes rendering issues.
Copy link
Contributor

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.

Copy link
Member Author

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

Copy link
Member Author

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

if (!(defaultTargetPlatform == TargetPlatform.iOS))
const Color.fromARGB(0, 0, 255, 255),
const Color.fromARGB(255, 0, 255, 255),
const Color.fromARGB(255, 0, 63, 255),
const Color.fromARGB(255, 0, 0, 191),
const Color.fromARGB(255, 63, 0, 91),
const Color.fromARGB(255, 255, 0, 0),
],
startPoints: <double>[
if (!(defaultTargetPlatform == TargetPlatform.iOS)) 0,
Rexios80 marked this conversation as resolved.
Show resolved Hide resolved
0.2,
0.4,
0.6,
0.8,
1.0,
],
),
maxIntensity: 1,
// Radius behaves differently on web and Android/iOS.
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Member Author

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:

Screen Shot 2022-10-18 at 6 00 04 PM

Screen Shot 2022-10-18 at 5 58 32 PM

Copy link
Member Author

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.

Copy link
Member Author

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

Screenshot 2022-12-22 at 2 41 03 PM

The code to get the radius:

int get radius => (prescaledRadius * window.devicePixelRatio).floor();

Copy link
Contributor

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?

Copy link
Member Author

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

radius: The radius of influence for each data point, in pixels.

https://developers.google.com/maps/documentation/ios-sdk/utility/heatmap

Radius: The size of the Gaussian blur applied to the heatmap, expressed in pixels. The default is 20. Must be between 10 and 50. Use GMUHeatmapTileLayer.radius to set the radius.

https://developers.google.com/maps/documentation/android-sdk/utility/heatmap

Radius: The size of the Gaussian blur applied to the heatmap, expressed in pixels. The default is 20. Must be between 10 and 50. Use the Builder's radius() to set the value when creating the heatmap, or change the value later with setRadius().

They all say the unit is "pixels" which seems like a lie unless something funky is going on

radius: kIsWeb ? 10 : 20,
)
}),
),
),
Expanded(
child: SingleChildScrollView(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Row(
children: <Widget>[
Column(
children: <Widget>[
TextButton(
onPressed:
disabledPoints.isNotEmpty ? _addPoint : null,
child: const Text('Add point'),
),
TextButton(
onPressed:
enabledPoints.isNotEmpty ? _removePoint : null,
child: const Text('Remove point'),
),
],
)
],
)
],
),
),
),
],
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_flutter_example/lite_mode.dart';
import 'animate_camera.dart';
import 'heatmap.dart';
import 'map_click.dart';
import 'map_coordinates.dart';
import 'map_ui.dart';
Expand Down Expand Up @@ -39,6 +40,7 @@ final List<GoogleMapExampleAppPage> _allPages = <GoogleMapExampleAppPage>[
const SnapshotPage(),
const LiteModePage(),
const TileOverlayPage(),
const HeatmapPage(),
];

/// MapsDemo is the Main Application.
Expand Down
Loading