---
title: "Google Earth Engine False Color Composites not showing correct location"
url: "https://openforis.support/questions/3016/google-earth-engine-false-color-composites-not-showing-correct-location"
tags: ["collectearth"]
status: "accepted"
score: 0
answer_count: 3
asked: "2021-01-05T03:17:19"
last_activity: "2021-01-09T10:54:06"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# Google Earth Engine False Color Composites not showing correct location

Asked by EarthOrbGIS on 2021-01-05

I use Collect Earth to assess landcover points in Southeast Asia. During my assessments, I use the Landsat and Sentinel False Color Composites (FCC) using the Google Earth Engine (GEE) app (no sign-in required). As I move from one sample point to the next, the GEE FCC panels would refresh to show the location of the sample being assessed in Google Earth.

The problem is that this does not work correctly each time. On some occasions, the GEE panels refresh fine. On others, they do not go to the location at all and instead show the North American continent. [See this link to the image][1], I cant post an image yet because image uploads on this forum are limited to users with > 60 reputation points.

When this issue happens, I try to fix it by refreshing the browser. Sometimes, this works and the panels are reoriented over the sample location. Other times, it does not work and continues to show the North American continent. When refreshing a point through the browser (Chrome) does not work, I deliberately click the next sample point in Collect Earth to force a 'hard' refresh, and then go back to the previous point. This sometimes works and sometimes doesn't.

Has anyone else faced this problem? How do I fix it such that this does not happen again? From my simplistic understanding of GEE, viewing imagery over a region of choice is simply via the use of `Map.centerObject()` in the GEE widgets for this app. So, I am not sure why it is malfunctioning.


  [1]: https://ibb.co/R96ckn5


## Accepted answer (score 1, by collectearth on 2021-01-07)

Link: https://openforis.support/questions/3016/google-earth-engine-false-color-composites-not-showing-correct-location/3025

The bug should be fixed now ( more like a workaround really)
There is a 7 seconds timeout function that forces the plot to be centered...it does not fix the underlying issue but It does work!

> Amazing! It works very well now, as you mentioned, if it shows the continental US in the panels, after about 7 seconds, the panels will then center to the plot! Very nice thank you! Curious, how did you set the 7 seconds timeout function? (EarthOrbGIS)

## Answer (score 1, by collectearth on 2021-01-05)

Link: https://openforis.support/questions/3016/google-earth-engine-false-color-composites-not-showing-correct-location/3019

Thank you for reporting the issue!

We are working on it, it seems that sometimes the Map.centerObject() is being ignored ( or perhaps it is called before the rest of the map is built).

This issue should be fixed today, will post an update here.

> Thank you for responding so promptly. I am glad to hear that this is a recognized problem and that there are efforts to fix it. Thanks! (EarthOrbGIS)

## Answer (score 0, by collectearth on 2021-01-09)

Link: https://openforis.support/questions/3016/google-earth-engine-false-color-composites-not-showing-correct-location/3029

The timeout is set at the end of the second script used by the GEE App:

it uses : **ui.util.setTimeout(func, delay)** function from the GEE Code Editor API

This is however bad programming from my side, as I should find where is the asynchronous method in the script that causes this random behavior (though it should all be synchronous...), sadly after spending a few hours trying to figure it out I gave up and used this kind of brute-force approach, however I will try to fix the root issue in a few weeks.

If you are curious about the GEE App used by Collect Earth do take a look at these scripts (which are the ones used by the app):

Script called from the **GEE App** that takes the URL parameters and sends them to the "main" script: https://code.earthengine.google.com/?scriptPath=users%2Fsanchezpauspro%2FApps%3ACollectEarthPlotAncillary

The **main** script mounting the UI : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Aframes_landsat_v4

The auxiliary scripts used by the "main" one :

**Charts** : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2Fcharts_v2

**Landsat imagery** : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2FSentinelLandsatImagery

**Sentinel imagery** : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2Fsentinel2

**UI helper** methods : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2Fui

More **helper** methods for imagery : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2Futils

Many examples here with the full repository
----------------------------------------
https://code.earthengine.google.com/?accept_repo=users/collectearth/ce_scripts 

![alt text][1]


  [1]: http://www.openforis.org/support/upfiles/chrome_2021-01-09_10-42-24.png
