Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
df81ca4
Wip: Android tiles
May 3, 2017
b529b89
Create intermediateBitmap with appropriate color and alpha and paints it
Bluesmile82 May 3, 2017
29df5cb
Limit zoom and rescale after that level
Bluesmile82 May 4, 2017
b854609
Get local tiles
j8seangel May 4, 2017
aebcc55
Remove unneeded logs and code
Bluesmile82 May 4, 2017
d300083
Scales the map to render the tiles without aliasing
Bluesmile82 May 4, 2017
fa93ce1
Merge branch 'feature/canvas-android' of github.com:Vizzuality/react-…
Bluesmile82 May 4, 2017
8155426
Pass params from RN
j8seangel May 5, 2017
67c1acf
Default props and view params
j8seangel May 8, 2017
a7b6ff2
Remove unvalid attribute
j8seangel May 8, 2017
4bc6786
Area id and app document folder
j8seangel May 9, 2017
9faaadb
Fix android path
j8seangel May 9, 2017
fd0152a
Filter alerts by min and max days since the start date in the tilePro…
Bluesmile82 May 9, 2017
09350da
Add interaction canvas layer
j8seangel May 10, 2017
4a7f4d7
Merge branch 'feature/canvas-android' of github.com:Vizzuality/react-…
j8seangel May 10, 2017
7f62ccd
Add interaction custom urltile layer
j8seangel May 11, 2017
df85723
New library for tile float part and fix zoom
j8seangel May 11, 2017
b434ef0
Show pixel only within data
j8seangel May 11, 2017
9c96c70
Disable fade and add tile size depends on zoom
j8seangel May 12, 2017
b3b2eb8
Add alerts type to support viirs visualization
j8seangel May 19, 2017
06cfd12
Show VIIRS alerts
j8seangel May 22, 2017
d1a3ce1
Refactor to use custom canvas tile base
j8seangel May 25, 2017
aa624e2
Fix viirs dates
j8seangel May 25, 2017
754c7bc
Merge branch 'master' into feature/canvas-android
j8seangel May 26, 2017
af13a6c
Remove logs
j8seangel May 29, 2017
428f262
Merge branch 'feature/canvas-android' of github.com:Vizzuality/react-…
j8seangel May 29, 2017
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
Prev Previous commit
Next Next commit
Fix viirs dates
  • Loading branch information
j8seangel committed May 25, 2017
commit aa624e2314f53cacdcf0bf847a0ff18ed391bc29
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,17 @@ protected Bitmap paintTile(Bitmap scaledBitmap, int width, int height, int zoom,
green = Color.green(c);
blue = Color.blue(c);

if (red > 255)
red = 255;
if (green > 255)
green = 255;
if (red > 255) red = 255;
if (green > 255) green = 255;
if (blue > 255) blue = 255;

int day;
if (this.alertType != null && this.alertType.equals("viirs")) {
day = blue;
} else {
day = red * 255 + green;
}

int day = red * 255 + green;
boolean inDay = day > 0 && day >= minDate && day <= maxDate;
boolean inXPoint = xPoint >= (xFilter - THRESHOLD) && (xPoint <= xFilter + THRESHOLD);
boolean inYPoint = yPoint >= (yFilter - THRESHOLD) && (yPoint <= yFilter + THRESHOLD);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ protected Bitmap paintTile(Bitmap scaledBitmap, int width, int height, int zoom,
green = (pixel >> 8) & 0xFF;
blue = pixel & 0xFF;

if (red > 255)
red = 255;
if (green > 255)
green = 255;
if (red > 255) red = 255;
if (green > 255) green = 255;
if (blue > 255) blue = 255;

int day;
if (this.alertType != null && this.alertType.equals("viirs")) {
Expand All @@ -45,7 +44,7 @@ protected Bitmap paintTile(Bitmap scaledBitmap, int width, int height, int zoom,
}

if(this.alertType != null && this.alertType.equals("viirs")) {
if (day > 0) {
if (day > 0 && day >= minDate && day <= maxDate) {
red = 244;
green = 66;
blue = 66;
Expand Down