flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
163.66k stars 26.91k forks source link

[google_maps_flutter] Add support for heatmap layer #33586

Open Rob-Biemans opened 5 years ago

Rob-Biemans commented 5 years ago

Add heatmap layer api support as in the Google Maps Javascript API, which can be found here; https://developers.google.com/maps/documentation/javascript/heatmaplayer

XinyueZ commented 5 years ago

+1

Rob-Biemans commented 5 years ago

@stuartmorgan Could you please label this issue? Thank you for your effort!

urmilshroff commented 4 years ago

Any word on this issue? I'm also looking for a way to display density hotspots/heatmaps in my Flutter app with the Maps plugin.

jerfeson commented 4 years ago

I am looking forward to this feature.+1

DCubix commented 4 years ago

I needed this feature asap!

clemclx commented 4 years ago

Agree ! Would really appreciate heatmap layer support..

fvisticot commented 4 years ago

Mandatory for our app. Please add this feature

MpEliaz commented 4 years ago

Please add!

SvenSlijkoord commented 4 years ago

Heatmap support is implemented for both Android & iOS in PR flutter/plugins#2454 but I am having trouble getting the podspec file to build because Google-Maps-iOS-Utils is a static framework dependency.

The build_all_plugins_ipa task gives the following error:

[!] The 'Pods-Runner' target has transitive dependencies that include statically linked binaries

Does anyone know how to include the Google-Maps-iOS-Utils dependency without breaking the build?

arok commented 4 years ago

@SvenSlijkoord https://github.com/googlemaps/google-maps-ios-utils/issues/23

cyanglaz commented 4 years ago

After looking into the google-maps-utils repo, I want to experiment to have a separate flutter plugin to handle all the features in the google-maps-utils. I will set up the new plugin and add some minimum code. After that, we can work together to add these new features. Including heat-map mentioned in this issue.

lbk9 commented 4 years ago

+1 this would be a brilliant thing to have accessible in Flutter

debasiskoley commented 4 years ago

+1, looking forward to having full heatmap support in Flutter!

bmabir17 commented 4 years ago

+1, looking forward to having full heatmap support in Flutter!

bmabir17 commented 4 years ago

I urgently needed this feature so i have forked the pull request And published a forked package google_maps_flutter_heatmap (Tested only on android)

rouvoy commented 4 years ago

Thanks for the fork and the package release, but it only seems to work on Android, unfortunately.

arok commented 4 years ago

@rouvoy see my fork https://github.com/arok/plugins/tree/implement_google_maps_flutter_heatmap it also works on iOS

mlemos commented 4 years ago

Please add this feature. This is a must-have for lots of maps based applications.

Alystrasz commented 3 years ago

Here's the current situation of Flutter heatmaps:

Any volunteer to develop this feature? :smile:

BhupinderRana commented 3 years ago

Here's the current situation of Flutter heatmaps:

Any volunteer to develop this feature? 😄

Hi is it any package right know to implement heat maps in flutter ? please

BhupinderRana commented 3 years ago

https://github.com/BhupinderRana/google_maps_flutter_heatmap i resolved ios build issue but in ios heat map not create

eamirho3ein3 commented 3 years ago

I needed this feature for web!

andagent commented 3 years ago

+1 looking forward to seeing it available for iOS and Android

ViniciusDiasSilva commented 3 years ago

+1 looking forward to seeing it available

Wian-TMC commented 2 years ago

+1 looking forward to seeing it available. Hopefully any day now

ruhulmath08 commented 2 years ago

Please update this package. This package is not dart null safety enable.

kandasak commented 2 years ago

Please update this package. This package is not dart null safety enable.

Where you able to find a way to implement heat maps in flutter?

Rexios80 commented 2 years ago

Working on this in https://github.com/flutter/plugins/pull/5274. I have tested basic heatmap support on Android and web. iOS and more testing needs done.

Rexios80 commented 2 years ago

iOS implementation is working now too

ZhuBoao commented 2 years ago

iOS implementation is working now too

looking forward to this to be merged!

paulinavita commented 1 year ago

Hi, any updates on this? Thanks!

Rexios80 commented 1 year ago

The PR for this has been useable for a long time: https://github.com/flutter/plugins/pull/5274#issuecomment-1120439314

wH1t3-l0tUs commented 1 year ago

@Rexios80 I have imported it like your comment, but doesn't work, does it change to the new version? can you show me?

Rexios80 commented 1 year ago

What doesn't work about it?

wH1t3-l0tUs commented 1 year ago

crashed on android with this message

E/AndroidRuntime(18527): java.lang.IllegalArgumentException: No input points.
E/AndroidRuntime(18527):    at com.google.maps.android.heatmaps.HeatmapTileProvider$Builder.weightedData(HeatmapTileProvider.java:209)
E/AndroidRuntime(18527):    at io.flutter.plugins.googlemaps.HeatmapBuilder.setWeightedData(HeatmapBuilder.java:25)
E/AndroidRuntime(18527):    at io.flutter.plugins.googlemaps.Convert.interpretHeatmapOptions(Convert.java:606)
E/AndroidRuntime(18527):    at io.flutter.plugins.googlemaps.HeatmapsController.addHeatmap(HeatmapsController.java:66)
E/AndroidRuntime(18527):    at io.flutter.plugins.googlemaps.HeatmapsController.addHeatmaps(HeatmapsController.java:32)
E/AndroidRuntime(18527):    at io.flutter.plugins.googlemaps.GoogleMapController.updateInitialHeatmaps(GoogleMapController.java:873)
E/AndroidRuntime(18527):    at io.flutter.plugins.googlemaps.GoogleMapController.onMapReady(GoogleMapController.java:215)
E/AndroidRuntime(18527):    at com.google.android.gms.maps.zzaf.zzb(com.google.android.gms:play-services-maps@@18.1.0:1)
E/AndroidRuntime(18527):    at com.google.android.gms.maps.internal.zzar.zza(com.google.android.gms:play-services-maps@@18.1.0:6)
E/AndroidRuntime(18527):    at com.google.android.gms.internal.maps.zzb.onTransact(com.google.android.gms:play-services-maps@@18.1.0:3)
E/AndroidRuntime(18527):    at android.os.Binder.transact(Binder.java:1164)
E/AndroidRuntime(18527):    at em.c(:com.google.android.gms.dynamite_mapsdynamite@223616044@22.36.16 (190400-0):2)
E/AndroidRuntime(18527):    at com.google.maps.api.android.lib6.impl.bg.run(:com.google.android.gms.dynamite_mapsdynamite@223616044@22.36.16 (190400-0):1)
E/AndroidRuntime(18527):    at android.os.Handler.handleCallback(Handler.java:942)
E/AndroidRuntime(18527):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(18527):    at android.os.Looper.loopOnce(Looper.java:201)
E/AndroidRuntime(18527):    at android.os.Looper.loop(Looper.java:288)
E/AndroidRuntime(18527):    at android.app.ActivityThread.main(ActivityThread.java:7898)
E/AndroidRuntime(18527):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(18527):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E/AndroidRuntime(18527):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
I/Process (18527): Sending signal. PID: 18527 SIG: 9
Lost connection to device.
Rexios80 commented 1 year ago

Did you pass a heatmap with no points?

wH1t3-l0tUs commented 1 year ago

Yes I fixed it, the map was created before the data had come

Rexios80 commented 1 year ago

I should probably add an assertion that the heatmap data isn't empty

wH1t3-l0tUs commented 1 year ago

@Rexios80 is there any way to control the camera of the heatmap? I want to change the position of it, but the googlemapcontroller is not able to use in it.

Rexios80 commented 1 year ago

Yeah it is

wH1t3-l0tUs commented 1 year ago

@Rexios80 can you show it? I have to recreate the map to init the camera position again

Rexios80 commented 1 year ago

The heatmap is just a layer. Everything else works exactly the same as without heatmaps.

wH1t3-l0tUs commented 1 year ago

@Rexios80 Is there any way to keep the color of the layer when we zoom in? As I zoom out, the color of each point is correct, but when zooming in, the points combine together, but their color is change to the max intensity

SuhasGaidhane commented 8 months ago

anyone have working project to Show HeatMap on FlutterApp Please provide Github Link

Rexios80 commented 8 months ago

The example app in my fork has a heatmap implementation

click2cloud-suhas commented 8 months ago

give me Github Link

flutter-triage-bot[bot] commented 7 months ago

This issue is marked P1 but has had no recent status updates.

The P1 label indicates high-priority issues that are at the top of the work list. This is the highest priority level a bug can have if it isn't affecting a top-tier customer or breaking the build. Bugs marked P1 are generally actively being worked on unless the assignee is dealing with a P0 bug (or another P1 bug). Issues at this level should be resolved in a matter of months and should have monthly updates on GitHub.

Please consider where this bug really falls in our current priorities, and label it or assign it accordingly. This allows people to have a clearer picture of what work is actually planned. Thanks!

stuartmorgan commented 7 months ago

This is in progress; keeping P1.

flutter-triage-bot[bot] commented 3 months ago

This issue is marked P1 but has had no recent status updates.

The P1 label indicates high-priority issues that are at the top of the work list. This is the highest priority level a bug can have if it isn't affecting a top-tier customer or breaking the build. Bugs marked P1 are generally actively being worked on unless the assignee is dealing with a P0 bug (or another P1 bug). Issues at this level should be resolved in a matter of months and should have monthly updates on GitHub.

Please consider where this bug really falls in our current priorities, and label it or assign it accordingly. This allows people to have a clearer picture of what work is actually planned. Thanks!

ZhuBoao commented 3 months ago

Would love to see this one being implemented.