| Maptitude GISDK Help |
Changes the scale and center of a map.
ZoomAndCenterMap(string map_name, real fraction, coordinate center)
| Argument | Contents |
|---|---|
| map_name | The map to be modified |
| fraction | The multiplier by which the width and height should be changed |
| center | The new center of the map |
If the map_name is null, ZoomAndCenterMap() uses the current map.
scp = GetMapScope()
ZoomAndCenterMap (null, 2.0, scp.center) // Zoom out (double the width and height); don't change the center
newcenter = Coord(-78000000, 43000000)
ZoomAndCenterMap ("my map", 0.5, newcenter) // Zoom in (cut the width and height in half), with new center
| Error Type | Meaning |
|---|---|
| NotFound | The specified map does not exist |
| Function | Summary |
|---|---|
| CenterMap() | Centers a map at a particular location |
| SetScale() | Sets the scale of a map |
| ZoomMap() | Changes the scale of a map |
| ©2025 Caliper Corporation | www.caliper.com |