DataSets[Builtin][WorldMap]
SetCenter
specify the view center for a WorldMap object
Calling Sequence
Parameters
Description
Examples
Compatibility
SetCenter(m,ref)
SetCenter(m,p)
m
-
a WorldMap object
ref
a Reference to the GeoNames dataset
p
a list representing a point
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.
m≔DataSets:-Builtin:-WorldMap⁡
m≔PLOT⁡...A map of the worldprojection: MillerCylindrical
SetCenter⁡m,−100,20
PLOT⁡...A map of the worldprojection: MillerCylindrical
Note that the center's y-coordinate is still 0.
Display⁡m
ref≔DataSets:-Builtin:-Reference⁡GeonamesCountry=Canada,Name=Waterloo
ref≔
m2≔DataSets:-Builtin:-WorldMap⁡ref
m2≔PLOT⁡...A map of the world with 3 pointsprojection: MillerCylindrical
SetCenter⁡m2,ref1
PLOT⁡...A map of the world with 3 pointsprojection: MillerCylindrical
Display⁡m2
The DataSets[Builtin][WorldMap][SetCenter] command was introduced in Maple 2017.
For more information on Maple 2017 changes, see Updates in Maple 2017.
See Also
SetView
WorldMap
ZoomIn
ZoomOut
Download Help Document