Constructor Summary |
|---|
|
Mapx
(
)
Create an empty Mapx object.
|
Method Summary |
|---|
|
setupvars
(
projection_name
,
lat0
,
lon0
,
lat1
,
lon1
,
rotation
,
scale
,
center_lat
,
center_lon
,
south
,
north
,
west
,
east
,
lat_interval
,
lon_interval
,
label_lat
,
label_lon
,
cil_detail
,
bdy_detail
,
riv_detail
,
equatorial_radius
,
eccentricity
)
Sets up the Mapx object parameters
|
|
reinit_mapx
(
)
Reinitializes internal variables based on the parameters.
|
|
within_mapx
(
lat
,
lon
)
Determines if a lat/lon coordinate is within the set Mapx bounds.
|
|
forward_mapx
(
lat
,
lon
,
u
,
v
)
Converts a lat/lon coordinate to an x/y map coordinate.
|
|
inverse_mapx
(
u
,
v
,
lat
,
lon
)
Converts an x/y map coordiate to a lat/lon coordinate
|
|
initialize
(
)
Sets up projection-specific initialization
|
|
geo_to_map
(
lat
,
lon
,
u
,
v
)
Converts from lat/lon to x/y
|
|
inverse_mapx
(
u
,
v
,
lat
,
lon
)
Converts an x/y map coordiate to a lat/lon coordinate
|
var mx = new Mapx;
mx.setupvars('Azimuthal Equal-Area', 90, 0, 0, 0,
0, 1, 90, 0, 0, 90, -180, 180, 15, 30, 0, 0,
0, 0, 1, 6371228.0, 0);
// Creates a Mapx object using the Azimuthal Equal-Area projection
// and the parameters given above.var status = mx.reinit_mapx();
// Reinitializes internal Mapx variables and returns the status
// of whether it was successful
var inbounds = mx.within_mapx(30.3, -30.2);
// Returns true if the coordinate 30.3N, -30.2S is within the
// boundaries set for the projection
var status = mx.forward_mapx(30.3, -40.2, x, y);
// Converts the coordinate 30.3N, 40.2W to the x/y values
// that coordinate represents on the projected map.
var status = mx.inverse_mapx(300, 400, lat, lon);
// Converts the coordinate 300,400 into the respective
// latitude/longitude value.
var status = mx.initialize();
// Initializes projection variables
var status = mx.forward_mapx(30.3, -40.2, x, y);
// Converts the coordinate 30.3N, 40.2W to the x/y values
// that coordinate represents on the projected map.
var status = mx.inverse_mapx(300, 400, lat, lon);
// Converts the coordinate 300,400 into the respective
// latitude/longitude value.