Add primary coordinates to JS vars

Change-Id: Iddea16b050c06ee6953682a359b13e00d2497d92