Hi gjs,

Thanks for the response. 
I am exactly using the same method, as in using shapes(gradient circles) .
And I know that zooming the map will auto zoom the images as well, but that 
will be against the kind of heatmap I need. My heatmap's density is based 
on the number of adjoining points, and so if a cluster was initially 
red(high density), then zooming in will move the markers farther, reducing 
the density and so will have to redraw based on the current zoom layout.

I am okay with redrawing when the zoom changes(i don't see any other way 
either, unless we create and store all images), but my main problem is that 
the overlayed layer is restricted based on the screen size(match-parent, 
and parent's size is fixed based on map container size), and so the image 
created on the overlayed layer is only for the markers currently visible on 
screen. Drawing circles directly on map will not work, as I don't think we 
can change the colors by pixel(the way we can do on a bitmap)

R


On Friday, 28 June 2013 07:16:52 UTC-4, gjs wrote:
>
> Hi,
>
> I am actually doing similar stuff to most things you mentioned, using a 
> custom View (overlayed) onto top of the Map and drawing bitmaps to the 
> canvas but not needing to rescale the bitmaps for zoom, using TileOverlay, 
> using GroundOverlay and also drawing Polylines, filled Polygons & Circles.
>
> I'm not needing heatmaps as yet myself, but I thought if your heatmaps are 
> fairly simple you could also try experimenting with drawing overlapping 
> filled Circles with different colors & also varying levels of transparency 
> to achieve a reasonable heatmap effect. If you do it this way I don't think 
> you will need to be resizing these when zooming.
>
> See https://developers.google.com/maps/documentation/android/shapes for 
> details.
>
> And no I can't post any code either.
>
> Good luck !
>
> Regards
>
> On Friday, June 28, 2013 5:54:07 AM UTC+10, raj wrote:
>>
>> Just wanted to update the thread with latest developments:
>>
>> I created a feature request on the Google Android Forum, and while the 
>> status is still marked 'New', I did get a reply. Hopefully, this will be 
>> available in future.
>> But, as I cannot wait till that happens, I have planned to go ahead with 
>> my implementation(using the above mentioned algorithm).
>> I am using a View to draw the heatmap, and then pass one the bitmap to a 
>> ground overlay.
>> Unfortunately, both TileOverlay and GroundOverlay are final classes, and 
>> so I cannot do extend them to do it my way.
>>
>> Here is a link to the request: 
>> https://code.google.com/p/gmaps-api-issues/issues/detail?id=5534&q=apitype%3DAndroid2&sort=-id%20-status%20project&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20Internal%20Project%20Apitype
>>
>> As you see, I was told to prefer TileOverlay over GroundOverlay, but am 
>> not sure how to do that, because the the transparent view I create is over 
>> the map-view, and its dimension is controlled by the screen 
>> size(match-parent), from where i get the screen location for each latlng 
>> point, and not the map itself. So if a point is not visible, then it will 
>> not be drawn by the algorithm(this was not intended, i am not able to find 
>> a workaround right now).
>> I feel, I will have the same issue with TileOverlay, as the image 
>> generated, will be only for the part visible on screen, and so I decided to 
>> go with GroundOverlay, which was much simpler.
>>
>> I would really appreciate if anyone is willing to share ideas to make 
>> this better.
>>
>> [Unfortunately I cannot post code online.]
>>
>>
>>
>> On Friday, 21 June 2013 14:20:56 UTC-4, raj wrote:
>>>
>>> Hi,
>>>
>>> I am trying to generate a heatmap, based on a set of LatLng points in 
>>> Android Maps v2.
>>> I am using the algorithm from here: 
>>> http://blog.furiousbob.com/2011/05/12/heating-up-my-new-xoom-tablet/
>>> I have gone through some examples online, but it uses Overlays which is 
>>> not just deprecated, but removed from the v2 of Maps API.
>>>
>>> I have been told that I can achieve the same using TileOverlay, which I 
>>> would like to try, but am unable to find even a simple example of it, which 
>>> does not use UrlTileProvider or pre-created set of images.
>>>
>>> I can use a View to generate the heatmap as a bitmap(via the view 
>>> canvas), but there dosen't seems to be anyway to map the bitmap to Tiles. 
>>>
>>> PS: Currently, I am placing this view over the map, which needs a lot of 
>>> re-computations when the map is panned or zoomed, and would want to avoid 
>>> that.
>>>
>>> Please let me know if anyone has any recommendations.
>>>
>>> Best,
>>> R
>>>
>>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to