SetCenter - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

DataSets[Builtin][WorldMap]

 SetCenter
 specify the view center for a WorldMap object

 Calling Sequence SetCenter(m,ref) SetCenter(m,p)

Parameters

 m - a WorldMap object ref - a Reference to the GeoNames dataset p - a list representing a point

Description

 • The SetCenter command changes the view center of m to a specified position.
 • If ref is supplied, ref must contain exactly one row, so that it corresponds to exactly one point.
 • If an explicit point p is given, the center point is set to be p.
 • p must be a list of two elements. The first element in p is the longitude (x-coordinate in the Geographic projection), and the second element in p is the latitude (y-coordinate in the Geographic projection).
 • If the latitude of the desired center is outside the allowed range for the current zoom level, the resulting center's latitude is set to either the maximum or minimum of the allowed range depending on whether the desired center is above or below the range. For example, at zoom level 1, the only allowed center latitude is 0, so setting it to anything other than 0 results in no change.

Examples

 > $m≔\mathrm{DataSets}:-\mathrm{Builtin}:-\mathrm{WorldMap}\left(\right)$
 ${m}{≔}\left(\begin{array}{cc}\left[{\mathrm{PLOT}}{}\left({\mathrm{...}}\right)\right]& \begin{array}{c}{\mathrm{A map of the world}}\\ {\mathrm{projection: MillerCylindrical}}\end{array}\end{array}\right)$ (1)
 > $\mathrm{SetCenter}\left(m,\left[-100,20\right]\right)$
 $\left(\begin{array}{cc}\left[{\mathrm{PLOT}}{}\left({\mathrm{...}}\right)\right]& \begin{array}{c}{\mathrm{A map of the world}}\\ {\mathrm{projection: MillerCylindrical}}\end{array}\end{array}\right)$ (2)

Note that the center's y-coordinate is still 0.

 > $\mathrm{Display}\left(m\right)$
 > $\mathrm{ref}≔\mathrm{DataSets}:-\mathrm{Builtin}:-\mathrm{Reference}\left("Geonames"\right)\left[\left[\mathrm{Country}="Canada",\mathrm{Name}="Waterloo"\right]\right]$
 ${\mathrm{ref}}{≔}\left[\right]$ (3)
 > $\mathrm{m2}≔\mathrm{DataSets}:-\mathrm{Builtin}:-\mathrm{WorldMap}\left(\mathrm{ref}\right)$
 ${\mathrm{m2}}{≔}\left(\begin{array}{cc}\left[{\mathrm{PLOT}}{}\left({\mathrm{...}}\right)\right]& \begin{array}{c}{\mathrm{A map of the world with 3 points}}\\ {\mathrm{projection: MillerCylindrical}}\end{array}\end{array}\right)$ (4)
 > $\mathrm{SetCenter}\left(\mathrm{m2},\mathrm{ref}\left[1\right]\right)$
 $\left(\begin{array}{cc}\left[{\mathrm{PLOT}}{}\left({\mathrm{...}}\right)\right]& \begin{array}{c}{\mathrm{A map of the world with 3 points}}\\ {\mathrm{projection: MillerCylindrical}}\end{array}\end{array}\right)$ (5)
 > $\mathrm{Display}\left(\mathrm{m2}\right)$

Compatibility

 • The DataSets[Builtin][WorldMap][SetCenter] command was introduced in Maple 2017.
 • For more information on Maple 2017 changes, see Updates in Maple 2017.