viewport update position

Noticed a few errors in the map height function. Hopefully this doesn't have any knock on effects.