# Zooming into a map

**URL:** <https://forum.kirupa.com/t/zooming-into-a-map/78333>\
**Category:** flash\
**Created:** [February 3, 2005, 4:42pm UTC](https://forum.kirupa.com/t/zooming-into-a-map/78333 "2005-02-03T16:42:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bee](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bee](https://forum.kirupa.com/u/bee)\
**Post date:** [February 3, 2005, 4:42pm UTC](https://forum.kirupa.com/t/zooming-into-a-map/78333/1 "2005-02-03T16:42:27Z")

</div>

Hi,  
I am writing a map manipaulation movie that requires me to have zoom functions. This is turning out to be more difficult than I thought. In its simplest state, all I want to do is zoom into the map and maintain the same central point in my view area.

1. I expand the map by some factor, e.g. times 1.1.
2. I then need to shift the map’s coordinates by some amount to ensure the central point stays still.

The problem is in calculating this amount. I think the map needs to go up and to the left when zooming in, i.e. the \_x and \_y values reduce. I originally thought this amount would simply be the \_x and \_y values times the zoom factor, but this is not right.

Has anyone any ideas or a reference where I might research this problem further.

Thanks
