Replies: 1 comment
-
Thankfully, I review the explanation in Animations and Transitions again. Try to practice with useMemo in React const getFlightsPositions(data, time){
// calculate and return current log, lng, alt
}
const [time, setTime] = useState(0)
const flightPositions = useMemo(
() => getFlightsPositions(data, time),
[time]
)
// Than apply it to textlayer
const textLayer = new TextLayer({
id: "text-layer",
data: flightPositions,
getPosition: (d) => d.position,
getText: (d) => d.name
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there!
Recently, I try build up a React App to show up flight info on the map with time series data. Wondering if I can show object's info aside of route, so I can know who is moving.
Than draw the map with
TripsLayer
Wondering if I can show up object's info like this, and also present some current info ( e.g.: current longitude, latitude, altitude ).
Also thinking if I can add
TextLayer
after clickSHOW UP
button, not sure if this make sense indeck.gl
Beta Was this translation helpful? Give feedback.
All reactions