we should really refactor getUrl to take in a second argument for 'location-api'