use getMeasures instead of window.location

Change-Id: I8a779002d6c0cfe42add71e227dfb1f47c4712aa