Got a puzzle for you expression-junkies out there...
I have two position keyframes, and my goal is to control the value of the second keyframe with the position properties of a Null object.
The map marker and text are parented to a Null object. Where the Null goes, the marker and text go.
I'd love to tie where the map zooms to the position property of the marker's Null object. It will take two keyframes, obviously. The first keyframe will be fixed at center, but as the camera zooms in, is there any way to connect the second keyframe to the position property of the marker's Null object? If you need a visual, I've got a picture below.
This animation will be re-used many times, all showing different parts of the US - so my goal is to turn this into an Essential Graphics file that I can simply edit in Premiere; no having to go back and forth with After Effects. This will not only save time in the long run, but it will also allow anyone on my team to make this map animation, even if they aren't highly skilled in Premiere or After Effects.
Looking forward to seeing what you come up with. Thanks in advance!
So it kinda works now. The comp is clearly responding to your expression (thanks, by the way!) and the marker Null controls that second keyframe, but it heads off in the wrong direction now. It's also weirdly interpreting spatial interpolation, so it kinda takes this long arc to get to the second keyframe.
Here, I've created a copy of this project for you to work with, rather than just going back and forth. See if you can make heads or tails of this...
You are getting the arc because you have two different keyframe values for position. If you don't want an arc both keyframes must have the same value.
I take it that you want to have the map center up on the null. Try removing the position keyframes for the map, then set two keyframes for Anchor Point that have the same value and add the expression to Anchor Point. As long as the Anchor Point is in the center of the map, the map will appear to move to the null. Put the null over Boston and the map will move to Boston. Put the null over Las Vegas and the map will move to Las Vegas.
You also made your Null 3D. You shouldn't do that unless the layer you want to move is also 3D because the 3D X and Y values will not match the Comp X and Y values unless you perform layer space transformations. The expression does the easing. There is no need to ease the keyframes for Anchor Point and they should be the same value. Their only purpose is to set the timing of the move.