Open gurjnderSingh opened 3 years ago
Before ZoomIn
After Zoom In
This is perhaps due to the radius size you have set. Based on our docs, the value is recommended to be between 10 and 50. See: https://developers.google.com/maps/documentation/ios-sdk/utility/heatmap#customize-the-heatmap
@arriolac Thanks! for your reply. But radius has no effect on this. I have tried all values from 10-60 for radius, for opacity value 1, and colorMapSize value 256. All these have no effect when I do zoom in. The result is the same as the above ss. Even I tried in the sample GitHub code the result is the same. In Android, the same is working fine i.e I have to do the same.
@arriolac Please help to find the solution.
Set maxIntensity: 3,
as an option of the HeatmapLayer
. Before setting this there was just a blur. This map has over ~14k points.
Or where there is a high density of points replace them with one point with a greater weight for performance if you don't require the pin point detail.
Try this
private var gradientColors = [UIColor.green, UIColor.red]
private var gradientStartPoints = [0.05, 0.5] as [NSNumber]
.
.
.
// Set heatmap options.
heatmapLayer = GMUHeatmapTileLayer()
heatmapLayer.radius = 100
heatmapLayer.opacity = 1.0
heatmapLayer.gradient = GMUGradient(colors: gradientColors,
startPoints: gradientStartPoints,
colorMapSize: 256)
heatmapLayer.maximumZoomIntensity = 17
heatmapLayer.minimumZoomIntensity = 10
after that add your lat lng list to weightData
// Add the latlngs to the heatmap layer.
heatmapLayer.weightedData = list
Set the colorMapSize to 16000 @gurjnderSingh
When I do zoom in, HeatMap is visible. As soon I started zoon in I am unable to see the color of the Heat Map.
I am using the same code private var gradientColors = [UIColor.green, UIColor.red] private var gradientStartPoints = [0.2, 1.0] as [NSNumber]
My code is same as you provided on Google developer site Please let me know if anything is misssing Thanks!