You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 8, 2017. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 8, 2017. It is now read-only.
This GL JS example and this Android SDK demo app activity claim to demonstrate “heat maps”, but in reality they’re hot spot maps. The “heat” only represents frequency, but not, say, a magnitude property in the GL JS example. The overlaid shapes can be blurred circles but not amorphous shapes, and the heat comes apart as you zoom in rather than spreading out.
The Android and iOS SDKs support something along the lines of these MapKit-based libraries, via an unsupported, undocumented OpenGL style layer API. But we should have a straightforward, officially supported solution for heat maps. As far as I can tell, we may need a new layer type that clusters nearby points of similar intensity into amorphous shapes (rather than collapsing them down into a single point). Please chime in if you think it’s doable with the existing layer types, though.
I did it using the raster tile overlay.
(ideally it would be done using opengl but this is ok out of the gate)
(this involved hacking the http_file_source.mm and would also involve protocol swizzling in order to override the control flow outside of sdk)
IMPORTANT
At the heart of this - I need the mapbox SDK to surface a way to provide a raster datasource for local data (not by disk location) / but by a delegate / callback like MKTileOverlay methods.
(or document the way to do this - as it's not entirely obvious)
At the heart of this - I need the mapbox SDK to surface a way to provide a raster datasource for local data (not by disk location) / but by a delegate / callback like MKTileOverlay methods.
(or document the way to do this - as it's not entirely obvious)
There isn’t currently a way to do this for raster content, other than to stand up a local server and point an MGLRasterSource at it. mapbox/mapbox-gl-native#7471 would introduce an API very similar to -[MKTileOverlay loadTileAtPath:result:].
Activity
lucaswoj commentedon Sep 21, 2016
Prior art of which I'm aware:
colorize-alphaproperty which would enable users to create heatmaps based on existing layer types.johndpope commentedon Dec 10, 2016
https://developer.skobbler.com/
also noteworthy -
johndpope commentedon Dec 17, 2016
I did it using the raster tile overlay.

(ideally it would be done using opengl but this is ok out of the gate)
(this involved hacking the http_file_source.mm and would also involve protocol swizzling in order to override the control flow outside of sdk)
inside the http_file_source.mm to overide the
NetSandbox.h
https://gist.github.com/johndpope/ebcb7c870cb09fd0cbf9b822f3f677a6
https://gist.github.com/johndpope/fc9749391faad76ee6b94d2ea7a237b6
IMPORTANT
At the heart of this - I need the mapbox SDK to surface a way to provide a raster datasource for local data (not by disk location) / but by a delegate / callback like MKTileOverlay methods.
(or document the way to do this - as it's not entirely obvious)
eg.
GridTileOverlay
-(void)loadTileAtPath:(MKTileOverlayPath)path result:(void (^)(NSData *, NSError *))result {
UIImage *image = [GridTileOverlay imageForTileX:x y:y z:z];
NSData *tileData = UIImagePNGRepresentation(img);
result(tileData,nil);
}
1ec5 commentedon Dec 17, 2016
There isn’t currently a way to do this for raster content, other than to stand up a local server and point an MGLRasterSource at it. mapbox/mapbox-gl-native#7471 would introduce an API very similar to
-[MKTileOverlay loadTileAtPath:result:].lucaswoj commentedon Jan 17, 2017
Migrated to mapbox/mapbox-gl-js#3994
1ec5 commentedon May 25, 2017
The discussion moved to mapbox/mapbox-gl-js#4756, since we realized TINs wouldn’t help us implement heat maps.