|
MapQuest Advantage JavaScript API Reference Documentation | |||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||
This file contains the bulk of the class that are used to communicate
with the server.
| Class Summary | |
| MQAddress | Contains information for geocoding and routing to and from addresses. |
| MQAuthentication | |
| MQAutoGeocodeCovSwitch | Stores geocode coverage switching parameters. |
| MQAutoMapCovSwitch | Stores map coverage switching parameters. |
| MQAutoRouteCovSwitch | Stores route coverage switching parameters. |
| MQBaseDTStyle | This is the base class for the DTStyle and DTStyleEx objects. |
| MQBestFit | Calculates the best scale and center point of a map for the given set of features in the Session. |
| MQBestFitLL | Calculates the best scale and center point of a map for the given collection Lat/Lngs. |
| MQCenter | Centers a map based on a mouse click. |
| MQCenterLatLng | Stores data to center the maps on a given point specified with a latitude/longitude point. |
| MQColorStyle | Pen styles for Rectangle and Line primitives. |
| MQConstants | Class that will contain all the constants for the js api. |
| MQCoordinateType | Constants to specify the type of coordinate the primitives should use. |
| MQCorridorSearchCriteria | Defines the criteria for a Corridor search. |
| MQCoverageStyle | A collection of DTStyle objects. |
| MQDBLayerQuery | Stores geocode coverage switching parameters. |
| MQDBLayerQueryCollection | A collection of MQDBLayerQuery objects. |
| MQDistanceUnits | Constants to specify the type of units to use when calculating distance. |
| MQDrawTrigger | Constants for trigger Draw Triggers |
| MQDTCollection | Contains a collection of display type codes. |
| MQDTFeatureStyleEx | Contains the appearance characteristics of all features for a given display type. |
| MQDTStyle | Contains the appearance characteristics of all features for a given display type. |
| MQDTStyleEx | This is the base class for the DTStyle and DTStyleEx objects. |
| MQEllipsePrimitive | Describes circle annotations to be placed on the map. |
| MQErrors | |
| MQFeature | |
| MQFeatureCollection | A collection of Feature objects. |
| MQFeatureSpeciferAttributeType | Constants for the attribute type of a FeatureSpecifier object. |
| MQFeatureSpecifier | Describes FeatureSpecifier annotations to be placed on the map. |
| MQFeatureSpecifierCollection | A collection of MQFeatureSpecifier objects. |
| MQFillStyle | Pen styles for Rectangle and Line primitives. |
| MQFontStyle | Constants for the font style in a DTStyle. |
| MQGeoAddress | Contains the results of geocoding an address. |
| MQGeocodeOptions | Class for specifying geocode parameters. |
| MQGeocodeOptionsCollection | A collection of MQGeocodeOptions objects. |
| MQIntCollection | Contains a collection of ints. |
| MQLineFeature | |
| MQLinePrimitive | Describes linear annotations to be placed on the map. |
| MQLocation | Contains properties common to MQAddress objects. |
| MQLocationCollection | Contains a collection of Location objects, usually Geocode results. |
| MQLocationCollectionCollection | Contains a collection of Location Collection objects, usually Batch Geocode results. |
| MQManeuver | This object will hold each maneuver of a trekroute returned from a route. |
| MQManeuverCollection | A collection of Maneuver objects which are used to annotate the map. |
| MQMapCommand | Allows actions (such as panning, zooming in, and zooming out) to be performed on a map. |
| MQMapState | Defines the characteristics of a map. |
| MQMatchType | Constants for the symbol type in a DTStyle. |
| MQNarrativeType | Constants to specify the type of route wanted. |
| MQPan | Stores data to center the map on a given point without changing its scale. |
| MQPenStyle | Pen styles for Rectangle and Line primitives. |
| MQPointCollection | A collection of Point objects. |
| MQPointFeature | |
| MQPolygonFeature | |
| MQPolygonPrimitive | Describes polygons to be placed on a map. |
| MQPolySearchCriteria | Defines the criteria for a poly search based on a collection of MQLatLngs |
| MQPrimitive | The base class for drawing objects that can be added to the map. |
| MQPrimitiveCollection | A collection of Primitive objects which are used to annotate the map. |
| MQQualityType | Constants for the symbol type in a DTStyle. |
| MQRadiusSearchCriteria | Defines the criteria for a radius search. |
| MQRecordSet | Class for retrieving record attribute information. |
| MQRectanglePrimitive | Describes linear annotations to be placed on the map. |
| MQRectSearchCriteria | Defines the criteria for a rectangle search. |
| MQRouteMatrixResults | Contains the results of a route matrix request. |
| MQRouteMatrixResultsCode | Constants to specify the type of route result. |
| MQRouteOptions | This class is used to set various options that will affect the type of route result returned from the DoRoute function. |
| MQRouteResults | Contains the results of a routing request. |
| MQRouteResultsCode | Constants to specify the type of route result. |
| MQRouteType | Constants to specify the type of route wanted. |
| MQSearchCriteria | Base class to define the criteria for a search. |
| MQSession | Uniquely identifies a MQSession. |
| MQSign | Contains information for geocoding and routing to and from addresses. |
| MQSignCollection | A collection of Sign objects. |
| MQSingleLineAddress | Contains information for Singleline geocoding and routing to and from addresses. |
| MQStrColCollection | Contains a collection of StringCollections. |
| MQStringCollection | Contains a collection of ints. |
| MQSymbolPrimitive | Describes a SymbolPrimitive to be placed on a map. |
| MQSymbolType | Constants for the symbol type in a DTStyle. |
| MQTextPrimitive | Describes text to be placed on the map. |
| MQTrekRoute | This object will hold each maneuver of a trekroute returned from a route. |
| MQTrekRouteCollection | A collection of TrekRoute objects which are used to annotate the map. |
| MQType | Base Type to encapsulate any common functions of the enum type pattern objects. |
| MQZoomIn | Stores data to zoom in one level and center the map on a given point. |
| MQZoomOut | Stores data to zoom out one level and center the map on a given point. |
| MQZoomTo | Stores data to zoom out one level and center the map on a given point. |
| MQZoomToRect | Stores data to zoom to a rectangle specified with pixel coordinates. |
| MQZoomToRectLatLng | Stores data to zoom to a rectangle specified with latitude/longitude points. |
| Method Summary | |
static Boolean
|
mqIsClass(strClassName, newObj, allowNull)
Utility function to wrap null and class type errors |
static void
|
MQXmlNodeObject( strName, strValue )
|
try{
var testCommons = new MQObject();
testCommons = null;
}catch(error){
throw "You must include mqcommon.js or toolkit api script prior to mqobjects.js.";
}
/**
* @fileoverview This file contains the bulk of the class that are used to communicate
* with the server.
*/
// utility function to wrap null and class type
/**
* Utility function to wrap null and class type errors
* @type Boolean
* @throws InvalidClassException This will throw an exception if the newObj is not the same type as
* this object.
* @throws NullPointerException This will throw an exception if the newObj is null and the allowNull
* is false.
*/
function mqIsClass(strClassName, newObj, allowNull){
if (newObj!==null){
try{
newObj.getClassName();
} catch (error){
throw "InvalidClassException";// " This class is not of type " + strClassName;
}
if(newObj.getClassName()===strClassName){
return true;
} else {
throw "InvalidClassException";// " This class " + newObj.getClassName() + " is not of type " + strClassName;
}
} else if(allowNull) {
return true;
}
throw "NullPointerException";// " This class is not allowed to be set to null";
};
// Begin class MQCONSTANTS
/**
* Constructs a new MQConstants object.
* @class Class that will contain all the constants for the
* js api.
*
*/
function MQConstants(){
/**
* Constant to hold a value for MQDistanceUnits<br>
* MILES = 0
* @type int
*/
this.MQDISTANCEUNITS_MILES = 0;
/**
* Constant to hold a value for MQDistanceUnits<br>
* KILOMETERS = 1
* @type int
*/
this.MQDISTANCEUNITS_KILOMETERS = 1;
/**
* Constant to hold value for radians conversion<br>
* RADIANS = 0.01745329251994
* @type Double
*/
this.MQLATLNG_RADIANS = 0.01745329251994;
/**
* Constant to hold a value for validation check<br>
* INVALID = 314159.265358
* @type Double
*/
this.MQLATLNG_INVALID = 314159.265358;
/**
* Constant to hold a value for validation check<br>
* TOLERANCE = 314159.265358
* @type Double
*/
this.MQLATLNG_TOLERANCE = 0.000001;
/**
* Constant to hold a value for validation check<br>
* INVALID = 32767
* @type int
*/
this.MQPOINT_INVALID = 32767;
/**
* Constant to hold a value for PI<br>
* PI = 3.14159265358979323846
* @type Double
*/
this.PI = 3.14159265358979323846;
/**
* Constant to hold a value for MQSearchCriteria<br>
* MILES_PER_DEGREE_LAT = 68.9
* @type Double
*/
this.MQSEARCHCRITERIA_MILES_PER_DEGREE_LAT = 68.9;
/**
* Constant to hold a value for MQSearchCriteria<br>
* DEGREES_LAT_PER_MILE = ( 1 / this.MILES_PER_DEGREE_LAT )
* @type Double
*/
this.MQSEARCHCRITERIA_DEGREES_LAT_PER_MILE = ( 1 / this.MQSEARCHCRITERIA_MILES_PER_DEGREE_LAT );
/**
* Constant to hold a value for calculations<br>
* MILES_PER_LATITUDE = 69.170976
* @type Double
*/
this.DISTANCEAPPROX_MILES_PER_LATITUDE = 69.170976;
/**
* Constant to hold a value for calculations<br>
* KILOMETERS_PER_MILE = 1.609347
* @type Double
*/
this.DISTANCEAPPROX_KILOMETERS_PER_MILE = 1.609347;
/**
* Constant to validate MQRouteTypes <br>
* FASTEST = 0
* @type int
*/
this.MQROUTETYPE_FASTEST = 0;
/**
* Constant to validate MQRouteTypes <br>
* SHORTEST = 1
* @type int
*/
this.MQROUTETYPE_SHORTEST = 1;
/**
* Constant to validate MQRouteTypes <br>
* PEDESTRIAN = 2
* @type int
*/
this.MQROUTETYPE_PEDESTRIAN = 2;
/**
* Constant to validate MQRouteTypes <br>
* OPTIMIZED = 3
* @type int
*/
this.MQROUTETYPE_OPTIMIZED = 3;
/**
* Constant to validate MQRouteTypes <br>
* SELECT_DATASET_ONLY = 4
* @type int
*/
this.MQROUTETYPE_SELECT_DATASET_ONLY = 4;
/**
* Constant to validate MQNarrativeTypes <br>
* DEFAULT = 0
* @type int
*/
this.MQNARRATIVETYPE_DEFAULT = 0;
/**
* Constant to validate MQNarrativeTypes <br>
* HTML = 1
* @type int
*/
this.MQNARRATIVETYPE_HTML = 1;
/**
* Constant to validate MQNarrativeTypes <br>
* NONE = -1
* @type int
*/
this.MQNARRATIVETYPE_NONE = -1;
/**
* Constant for MQRouteOptions <br>
* @type String
*/
this.MQROUTEOPTIONS_AVOID_ATTRIBUTE_LIMITED_ACCESS = "Limited Access";
/**
* Constant for MQRouteOptions <br>
* @type String
*/
this.MQROUTEOPTIONS_AVOID_ATTRIBUTE_TOLL_ROAD = "Toll Road";
/**
* Constant for MQRouteOptions <br>
* @type String
*/
this.MQROUTEOPTIONS_AVOID_ATTRIBUTE_FERRY = "Ferry";
/**
* Constant for MQRouteOptions <br>
* @type String
*/
this.MQROUTEOPTIONS_AVOID_ATTRIBUTE_UNPAVED_ROAD = "Unpaved";
/**
* Constant for MQRouteOptions <br>
* @type String
*/
this.MQROUTEOPTIONS_AVOID_ATTRIBUTE_SEASONAL = "Approximate seasonal closure";
/**
* Constant for MQRouteOption Language <br>
* @type String
*/
this.MQROUTEOPTIONS_LANGUAGE_ENGLISH = "English";
/**
* Constant for MQRouteOption Language <br>
* @type String
*/
this.MQROUTEOPTIONS_LANGUAGE_FRENCH = "French";
/**
* Constant for MQRouteOption Language <br>
* @type String
*/
this.MQROUTEOPTIONS_LANGUAGE_GERMAN = "German";
/**
* Constant for MQRouteOption Language <br>
* @type String
*/
this.MQROUTEOPTIONS_LANGUAGE_ITALIAN = "Italian";
/**
* Constant for MQRouteOption Language <br>
* @type String
*/
this.MQROUTEOPTIONS_LANGUAGE_SPANISH = "Spanish";
/**
* Constant for MQRouteOption Language <br>
* @type String
*/
this.MQROUTEOPTIONS_LANGUAGE_DANISH = "Danish";
/**
* Constant for MQRouteOption Language <br>
* @type String
*/
this.MQROUTEOPTIONS_LANGUAGE_DUTCH = "Dutch";
/**
* Constant for MQRouteOption Language <br>
* @type String
*/
this.MQROUTEOPTIONS_LANGUAGE_NORWEGIAN = "Norwegian";
/**
* Constant for MQRouteOption Language <br>
* @type String
*/
this.MQROUTEOPTIONS_LANGUAGE_SWEDISH = "Swedish";
/**
* Constant for MQRouteOption Language <br>
* @type String
*/
this.MQROUTEOPTIONS_LANGUAGE_IBERIAN_SPANISH = "Iberian Spanish";
/**
* Constant for MQRouteOption Language <br>
* @type String
*/
this.MQROUTEOPTIONS_LANGUAGE_BRITISH_ENGLISH = "British English";
/**
* Constant for MQRouteOption Language <br>
* @type String
*/
this.MQROUTEOPTIONS_LANGUAGE_IBERIAN_PORTUGUESE ="Iberian Portuguese";
/**
* Constant for MQRouteResultsCode type validation <br>
* @type int
*/
this.MQROUTERESULTSCODE_NOT_SPECIFIED = -1;
/**
* Constant for MQRouteResultsCode type validation <br>
* @type int
*/
this.MQROUTERESULTSCODE_SUCCESS = 0;
/**
* Constant for MQRouteResultsCode type validation <br>
* @type int
*/
this.MQROUTERESULTSCODE_INVALID_LOCATION = 1;
/**
* Constant for MQRouteResultsCode type validation <br>
* @type int
*/
this.MQROUTERESULTSCODE_ROUTE_FAILURE = 2;
/**
* Constant for MQRouteResultsCode type validation <br>
* @type int
*/
this.MQROUTERESULTSCODE_NO_DATASET_FOUND = 3;
/**
* Constant for MQRouteMatrixResultsCode type validation <br>
* @type int
*/
this.MQROUTEMATRIXRESULTSCODE_NOT_SPECIFIED = -1;
/**
* Constant for MQRouteMatrixResultsCode type validation <br>
* @type int
*/
this.MQROUTEMATRIXRESULTSCODE_SUCCESS = 0;
/**
* Constant for MQRouteMatrixResultsCode type validation <br>
* @type int
*/
this.MQROUTEMATRIXRESULTSCODE_INVALID_LOCATION = 1;
/**
* Constant for MQRouteMatrixResultsCode type validation <br>
* @type int
*/
this.MQROUTEMATRIXRESULTSCODE_ROUTE_FAILURE = 2;
/**
* Constant for MQRouteMatrixResultsCode type validation <br>
* @type int
*/
this.MQROUTEMATRIXRESULTSCODE_NO_DATASET_FOUND = 3;
/**
* Constant for MQRouteMatrixResultsCode type validation <br>
* @type int
*/
this.MQROUTEMATRIXRESULTSCODE_INVALID_OPTION = 4;
/**
* Constant for MQRouteMatrixResultsCode type validation <br>
* @type int
*/
this.MQROUTEMATRIXRESULTSCODE_PARTIAL_SUCCESS = 5;
/**
* Constant for MQRouteMatrixResultsCode type validation <br>
* @type int
*/
this.MQROUTEMATRIXRESULTSCODE_EXCEEDED_MAX_LOCATIONS = 6;
/**
* Constant for MQManeuver heading values <br>
* @type int
*/
this.MQMANEUVER_HEADING_NULL = 0;
/**
* Constant for MQManeuver heading values <br>
* @type int
*/
this.MQMANEUVER_HEADING_NORTH = 1;
/**
* Constant for MQManeuver heading values <br>
* @type int
*/
this.MQMANEUVER_HEADING_NORTH_WEST = 2;
/**
* Constant for MQManeuver heading values <br>
* @type int
*/
this.MQMANEUVER_HEADING_NORTH_EAST = 3;
/**
* Constant for MQManeuver heading values <br>
* @type int
*/
this.MQMANEUVER_HEADING_SOUTH = 4;
/**
* Constant for MQManeuver heading values <br>
* @type int
*/
this.MQMANEUVER_HEADING_SOUTH_EAST = 5;
/**
* Constant for MQManeuver heading values <br>
* @type int
*/
this.MQMANEUVER_HEADING_SOUTH_WEST = 6;
/**
* Constant for MQManeuver heading values <br>
* @type int
*/
this.MQMANEUVER_HEADING_WEST = 7;
/**
* Constant for MQManeuver heading values <br>
* @type int
*/
this.MQMANEUVER_HEADING_EAST = 8;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_STRAIGHT = 0;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_SLIGHT_RIGHT = 1;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_RIGHT = 2;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_SHARP_RIGHT = 3;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_REVERSE = 4;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_SHARP_LEFT = 5;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_LEFT = 6;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_SLIGHT_LEFT = 7;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_RIGHT_UTURN = 8;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_LEFT_UTURN = 9;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_RIGHT_MERGE = 10;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_LEFT_MERGE = 11;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_RIGHT_ON_RAMP = 12;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_LEFT_ON_RAMP = 13;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_RIGHT_OFF_RAMP = 14;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_LEFT_OFF_RAMP = 15;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_RIGHT_FORK = 16;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_LEFT_FORK = 17;
/**
* Constant for MQManeuver turning values <br>
* @type int
*/
this.MQMANEUVER_TURN_TYPE_STRAIGHT_FORK = 18;
/**
* Constant for MQManeuver attribute values <br>
* @type int
*/
this.MQMANEUVER_ATTRIBUTE_PORTIONS_TOLL = 1;
/**
* Constant for MQManeuver attribute values <br>
* @type int
*/
this.MQMANEUVER_ATTRIBUTE_PORTIONS_UNPAVED = 2;
/**
* Constant for MQManeuver attribute values <br>
* @type int
*/
this.MQMANEUVER_ATTRIBUTE_POSSIBLE_SEASONAL_ROAD_CLOSURE = 4;
/**
* Constant for MQManeuver attribute values <br>
* @type int
*/
this.MQMANEUVER_ATTRIBUTE_GATE = 8;
/**
* Constant for MQManeuver attribute values <br>
* @type int
*/
this.MQMANEUVER_ATTRIBUTE_FERRY = 16;
/**
* Constant for MQCoordinateType attribute values <br>
* @type int
*/
this.MQCOORDINATETYPE_GEOGRAPHIC = 1;
/**
* Constant for MQCoordinateType attribute values <br>
* @type int
*/
this.MQCOORDINATETYPE_DISPLAY = 2;
/**
* Constant for MQDrawTrigger attribute values <br>
* @type int
*/
this.MQDRAWTRIGGER_BEFORE_POLYGONS = 3585;
/**
* Constant for MQDrawTrigger attribute values <br>
* @type int
*/
this.MQDRAWTRIGGER_AFTER_POLYGONS = 3586;
/**
* Constant for MQDrawTrigger attribute values <br>
* @type int
*/
this.MQDRAWTRIGGER_BEFORE_TEXT = 3588;
/**
* Constant for MQDrawTrigger attribute values <br>
* @type int
*/
this.MQDRAWTRIGGER_AFTER_TEXT = 3618;
/**
* Constant for MQDrawTrigger attribute values <br>
* @type int
*/
this.MQDRAWTRIGGER_BEFORE_ROUTE_HIGHLIGHT = 3616;
/**
* Constant for MQDrawTrigger attribute values <br>
* @type int
*/
this.MQDRAWTRIGGER_AFTER_ROUTE_HIGHLIGHT = 3617;
/**
* Constant for MQPenStyle attribute values
* @type int
*/
this.MQPENSTYLE_SOLID = 0;
/**
* Constant for MQPenStyle attribute values
* @type int
*/
this.MQPENSTYLE_DASH = 1;
/**
* Constant for MQPenStyle attribute values
* @type int
*/
this.MQPENSTYLE_DOT = 2;
/**
* Constant for MQPenStyle attribute values
* @type int
*/
this.MQPENSTYLE_DASH_DOT = 3;
/**
* Constant for MQPenStyle attribute values
* @type int
*/
this.MQPENSTYLE_DASH_DOT_DOT = 4;
/**
* Constant for MQPenStyle attribute values
* @type int
*/
this.MQPENSTYLE_NONE = 5;
/**
* Constant for MQColorStyle attribute values
* @type int
*/
this.MQCOLORSTYLE_INVALID = 0xffffffff;
/**
* Constant for MQColorStyle attribute values
* @type int
*/
this.MQCOLORSTYLE_BLACK = 0;
/**
* Constant for MQColorStyle attribute values
* @type int
*/
this.MQCOLORSTYLE_BLUE = 16711680;
/**
* Constant for MQColorStyle attribute values
* @type int
*/
this.MQCOLORSTYLE_CYAN = 16776960;
/**
* Constant for MQColorStyle attribute values
* @type int
*/
this.MQCOLORSTYLE_DARK_GRAY = 4210752;
/**
* Constant for MQColorStyle attribute values
* @type int
*/
this.MQCOLORSTYLE_GRAY = 8421504;
/**
* Constant for MQColorStyle attribute values
* @type int
*/
this.MQCOLORSTYLE_GREEN = 65280;
/**
* Constant for MQColorStyle attribute values
* @type int
*/
this.MQCOLORSTYLE_LIGHT_GRAY = 12632256;
/**
* Constant for MQColorStyle attribute values
* @type int
*/
this.MQCOLORSTYLE_MAGENTA = 16711935;
/**
* Constant for MQColorStyle attribute values
* @type int
*/
this.MQCOLORSTYLE_ORANGE = 51455;
/**
* Constant for MQColorStyle attribute values
* @type int
*/
this.MQCOLORSTYLE_PINK = 11513855;
/**
* Constant for MQColorStyle attribute values
* @type int
*/
this.MQCOLORSTYLE_RED = 255;
/**
* Constant for MQColorStyle attribute values
* @type int
*/
this.MQCOLORSTYLE_WHITE = 16777215;
/**
* Constant for MQColorStyle attribute values
* @type int
*/
this.MQCOLORSTYLE_YELLOW = 65535;
/**
* Constant for MQFillStyle attribute values
* @type int
*/
this.MQFILLSTYLE_SOLID = 0;
/**
* Constant for MQFillStyle attribute values
* @type int
*/
this.MQFILLSTYLE_BDIAGONAL = 1;
/**
* Constant for MQFillStyle attribute values
* @type int
*/
this.MQFILLSTYLE_CROSS = 2;
/**
* Constant for MQFillStyle attribute values
* @type int
*/
this.MQFILLSTYLE_DIAG_CROSS = 3;
/**
* Constant for MQFillStyle attribute values
* @type int
*/
this.MQFILLSTYLE_FDIAGONAL = 4;
/**
* Constant for MQFillStyle attribute values
* @type int
*/
this.MQFILLSTYLE_HORIZONTAL = 5;
/**
* Constant for MQFillStyle attribute values
* @type int
*/
this.MQFILLSTYLE_VERTICAL = 6;
/**
* Constant for MQFillStyle attribute values
* @type int
*/
this.MQFILLSTYLE_NONE = 7;
/**
* Constant for MQSymbolType attribute values
* @type int
*/
this.MQSYMBOLTYPE_RASTER = 0;
/**
* Constant for MQSymbolType attribute values
* @type int
*/
this.MQSYMBOLTYPE_VECTOR = 1;
/**
* Constant for TextAlignment attribute values
* @type int
* @see MQTextPrimitive
*/
this.MQTEXTALIGNMENT_CENTER = 1;
/**
* Constant for TextAlignment attribute values
* @type int
* @see MQTextPrimitive
*/
this.MQTEXTALIGNMENT_LEFT = 2;
/**
* Constant for TextAlignment attribute values
* @type int
* @see MQTextPrimitive
*/
this.MQTEXTALIGNMENT_RIGHT = 4;
/**
* Constant for TextAlignment attribute values
* @type int
* @see MQTextPrimitive
*/
this.MQTEXTALIGNMENT_BASELINE = 8;
/**
* Constant for TextAlignment attribute values
* @type int
* @see MQTextPrimitive
*/
this.MQTEXTALIGNMENT_BOTTOM = 16;
/**
* Constant for TextAlignment attribute values
* @type int
* @see MQTextPrimitive
*/
this.MQTEXTALIGNMENT_TOP = 32;
/**
* Constant for MQFontStyle attribute values
* @type int
*/
this.MQFONTSTYLE_INVALID = -1;
/**
* Constant for MQFontStyle attribute values
* @type int
*/
this.MQFONTSTYLE_NORMAL = 0;
/**
* Constant for MQFontStyle attribute values
* @type int
*/
this.MQFONTSTYLE_BOLD = 1;
/**
* Constant for MQFontStyle attribute values
* @type int
*/
this.MQFONTSTYLE_BOXED = 2;
/**
* Constant for MQFontStyle attribute values
* @type int
*/
this.MQFONTSTYLE_OUTLINED = 4;
/**
* Constant for MQFontStyle attribute values
* @type int
*/
this.MQFONTSTYLE_ITALICS = 8;
/**
* Constant for MQFontStyle attribute values
* @type int
*/
this.MQFONTSTYLE_UNDERLINE = 16;
/**
* Constant for MQFontStyle attribute values
* @type int
*/
this.MQFONTSTYLE_STRIKEOUT = 32;
/**
* Constant for MQFontStyle attribute values
* @type int
*/
this.MQFONTSTYLE_THIN = 64;
/**
* Constant for MQFontStyle attribute values
* @type int
*/
this.MQFONTSTYLE_SEMIBOLD = 128;
/**
* Constant for MQFontStyle attribute values
* @type int
*/
this.MQFONTSTYLE_MAX_VALUE = 256;
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_DT_NULL = 65532; // Null DT (meaning no DT specified)
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_CT_ROAD = 0;
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_CT_LINE = 1;
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_CT_POLYGON = 2;
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_CT_POINT = 3;
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_CT_POI = 4;
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_CT_SEED = 5;
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_CT_DISPLAYLIST = 6;
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_CT_APP = 7;
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_CT_XA = 8;
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_BT_LINE = 0;
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_BT_POLYGON = 1;
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_BT_POINT = 2;
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_BT_OTHER = 3;
/**
* Constant for MQBaseDTStyle attribute values
* @type int
*/
this.MQBASEDTSTYLE_BT_XA = 4;
/**
* Constant for MQFeatureSpeciferAttributeType attribute values
* @type int
*/
this.MQFEATURESPECIFERATTRIBUTETYPE_GEFID = 0;
/**
* Constant for MQFeatureSpeciferAttributeType attribute values
* @type int
*/
this.MQFEATURESPECIFERATTRIBUTETYPE_NAME = 1;
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_LOC = 0; // Location
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_INTR = 1; // Intersection
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_NEARBLK = 2; // Block - Nearest numbered
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_REPBLK = 3; // Block - Representative (Centroid)
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_BLOCK = 4; // Block
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_AA1 = 5; // Admin - Country
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_AA2 = 6; // Admin - Division
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_AA3 = 7; // Admin - State
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_AA4 = 8; // Admin - County
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_AA5 = 9; // Admin - City
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_AA6 = 10; // Admin - Division (rarely used)
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_AA7 = 11; // Admin - smallest division (rarely used)
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_PC1 = 12; // Postal - Zip
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_PC2 = 13; // Postal -
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_PC3 = 14; // Postal -
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_PC4 = 15; // Postal -
/**
* Constant for MQMatchType attribute values
* @type int
*/
this.MQMATCHTYPE_POI = 16; // POI
/**
* Constant for MQQualityType attribute values
* @type int
*/
this.MQQUALITYTYPE_EXACT = 0; // Exact
/**
* Constant for MQQualityType attribute values
* @type int
*/
this.MQQUALITYTYPE_GOOD = 1; // Good
/**
* Constant for MQQualityType attribute values
* @type int
*/
this.MQQUALITYTYPE_APPROX = 2; // Approximate
}
var MQCONSTANT = new MQConstants();
// End class MQCONSTANTS
// Begin class MQERRORS
function MQErrors(){
/** @type String
*/
this.RECORDSET_GETFIELD_1 = "failure in getField -- m_curRec is not Pointing to an existing Record";
/** @type String
*/
this.RECORDSET_GETFIELD_2 = "failure in getField -- could not find strFieldName";
/** @type String
*/
this.RECORDSET_MOVEFIRST_1 = "failure in moveFirst -- Error Moving Cursor, RecordSet is Empty.";
/** @type String
*/
this.RECORDSET_MOVELAST_1 = "Error Moving Cursor, RecordSet is Empty.";
/** @type String
*/
this.RECORDSET_MOVENEXT_1 = "Error Moving Cursor, EOF was true.";
/** @type String
*/
this.RECORDSET_MOVENEXT_2 = "Error Moving Cursor, Unknown Error.";
/** @type String
*/
this.RECORDSET_MOVENEXT_3 = "Error Moving Cursor, RecordSet is Empty.";
}
var MQERROR = new MQErrors();
// End class MQERRORS
// Begin Class MQSign
/* Inheirit from MQObject */
MQSign.prototype = new MQObject();
MQSign.prototype.constructor = MQSign;
/**
* Constructs a new MQSign object.
* @class Contains information for geocoding and routing to and from
* addresses.
* @extends MQObject
*/
function MQSign () {
MQObject.call(this);
this.setM_Xpath("Sign");
this.setM_XmlDoc(mqCreateXMLDocFromNode(MQXML.getSIGN()));
}
/**
* Returns the text name of this class.
* @return The text name of this class.
* @type String
*/
MQSign.prototype.getClassName = function(){
return "MQSign";
};
/**
* Returns the version of this class.
* @return The version of this class.
* @type int
*/
MQSign.prototype.getObjectVersion = function(){
return 0;
};
/**
* Assigns the xml that relates to this object.
* @param {String} strXml the xml to be assigned.
* @type void
*
*/
MQSign.prototype.loadXml = function (strXml) {
this.setM_XmlDoc(mqCreateXMLDoc(strXml));
};
/**
* Assigns the xml that relates to this object.
* @param {XML Node} node of the document.
* @type void
* @private
*/
MQSign.prototype.loadXmlFromNode = function (node) {
this.setM_XmlDoc(mqCreateXMLDocImportNode(node));
};
/**
* Build an xml string that represents this object.
* @return The xml string.
* @type String
*
*/
MQSign.prototype.saveXml = function () {
return mqXmlToStr(this.getM_XmlDoc());
};
/**
* initializes the object to its defaults.
*/
MQSign.prototype.clear = function (){
this.setType(0);
this.setText("");
this.setExtraText("");
this.setDirection(MQCONSTANT.MQMANEUVER_HEADING_NULL);
};
/**
* Sets Type.
* @param {int} type The Type
* @type void
*/
MQSign.prototype.setType = function(type){
this.setProperty("Type",type);
};
/**
* Returns the type.
*
* <pre>
* LIST OF VALUES:
* 0 No sign
*
* United States Road Shield Tokens
* 1 Interstate
* 2 US Highway
* 3 State Route
* 4 County Route / Parish Route
* 5 Interstate Business
* 10 Farm to Market (FM)
* 11 Bureau of Indian Affairs (BIA)
*
* Puerto Rico Road Shield Tokens
* 15 Carr
* 16 Carretera
*
* US Virgin Islands Road Shield Tokens
* 19 National Roads
*
* Canada Road Shield Tokens
* 20 Trans Canada Highway
* 21 Autoroute
* 22 Primary Provincial Route
* 23 Provincial Secondary Route
* 24 District Route / Regional Route
* 25 Yellowhead Highway
*
* United Kingdom Road Shield Tokens
* 30 Motorway / M Road
* 31 National / A Road
* 33 Regional / B Road
* 34 C Road
*
* Brazil Road Shield Tokens
* 35 National
* 36 State
*
* Mexico Road Shield Tokens
* 40 Federal Route
* 41 Route Type 2
* 42 State Route
*
* Argentina Road Shield Tokens
* 45 National
* 46 Provincial
*
* European Road Shield Tokens
* 50 European / E Road
*
* Andorra Road Shield Tokens
* 52 Carretera General
* 53 Carretera Secundaria
*
* Austria Road Shield Tokens
* 55 Autobahnen
* 56 Schnellstrassen
* 57 Bundersstrassen
* 58 Landestrassen / Bezirkstrassen / Privatstrassen des Bundes
*
* Belgium Road Shield Tokens
* 60 Autosnelwegen
* 61 Gewestwegen
* 62 Bretelles / Ring / Regionaalwegen
*
* Denmark Road Shield Tokens
* 65 Primaerrute
* 66 Sekendaerrute
*
* Finland Road Shield Tokens
* 70 Valtatie
* 71 Kantatie
* 72 Seututie
* 73 Muun Yleisen Tie
*
* France / Monaco Road Shield Tokens
* 75 Autoroutes
* 76 Routes Nationales
* 77 Departmentale Strategique / Routes Departmentales
* 78 Voie Communale, Chemin Rural / Vicinal / Communal
* 79 Local
*
* Germany Road Shield Tokens
* 80 Autobahnen
* 81 Bundesstrassen
*
* Italy / San Marino / Vatican City State Road Shield Tokens
* 90 Autostrada
* 91 Strada Statale
* 92 Strada Provinciale / Strada Regionale
*
* Luxembourg Road Shield Tokens
* 95 Autoroute A
* 96 Routes Nationales
* 97 Chemins Repris
* 98 Autoroute B
*
* The Netherlands (Holland) Road Shield Tokens
* 100 Autosnelwegen
* 101 Nationale wegen
* 102 Stadsroutenummmers
*
* Norway Road Shield Tokens
* 105 Riksveg
* 106 Fylkeveg
*
* Portugal Road Shield Tokens
* 110 Autostrada
* 111 Itinerario Principal
* 112 Itinerario Complementar
* 113 Estrada Nacional
* 114 Estrada Municipal
*
* Spain Road Shield Tokens
* 115 Autopista
* 116 Nacional
* 117 Autonomica 1st order
* 118 Autonomica 2nd order / Autonomica Local
* 119 Autonomica Local
*
* Sweden Road Shield Tokens
* 120 Riksvag
* 121 Lansvag
*
* Switzerland / Liechtenstein Road Shield Tokens
* 125 Autostrassen
* 126 Haupstrassen
*
* Czech Republic Road Shield Tokens
* 130 Dalnice
* 131 Silnice
*
* Greece Road Shield Tokens
* 140 National Roads
*
* Hungary Road Shield Tokens
* 150 Autopalya (Motorways)
* 151 Orszagut (Country Roads)
*
* Bosnia and Herzegovina Road Shield Tokens
* 152 Autoput
* 153 Magistralni Put
* 154 Regionalni Put
*
* Estonia Road Shield Tokens
* 155 Pohimaantee (Motorway)
* 156 Tugimaantee (National)
* 157 Korvalmaantee (Regional)
*
* Poland Road Shield Tokens
* 160 Autostrada (Motorways
* 161 Drogo Ekspresowa (Expressway)
* 162 Drogo Krajowa (National Road)
* 163 Drogo Wojewodzka (Regional Road)
*
* Latvia Road Shield Tokens
* 165 Galvenie Autoceii (Motorway)
* 166 Skiras Autoceii (1st class road)
* 167 Skiras Autoceii (2nd class road)
*
* Bulgaria Road Shield Tokens
* 168 Magistrala (Motorway)
* 169 Put (National Road)
*
* Slovak Republic Road Shield Tokens
* 170 Dialnice
* 171 Cesty
*
* Albania Road Shield Tokens
* 172 Route Type 2
* 173 Route Type 3
*
* Lithuania Road Shield Tokens
* 175 Magistraliniai Keliai
* 176 Krasto Keliai
* 177 Rajoniniai Keliai
*
* Slovenia Road Shield Tokens
* 180 Avtocesta
* 181 Hitra Cesta
* 182 Glavna Cesta
* 183 Regionalna Cesta
*
* Croatia Road Shield Tokens
* 185 Autocesta
* 186 Drzavna
* 187 Zupanijska Cesta
*
* Romania Road Shield Tokens
* 190 Class 2 (A1, A2)
* 191 Class 3
* 192 Class 4
*
* United Arab Emirates Road Shield Tokens
* 200 Federal
* 201 Emirate
*
* Oman Road Shield Tokens
* 205 Class 1
* 206 Class 2
*
* Bahrain Road Shield Tokens
* 208 Highway Class 2
*
* Kuwait Road Shield Tokens
* 210 Ring Road
* 211 2 Digit State Route
*
* Saudi Arabia Road Shield Tokens
* 212 Class 1
* 213 Class 2
* 214 Class 3
*
* Hong Kong Road Shield Tokens
* 215 Highway
*
* Taiwan Road Shield Tokens
* 220 National Freeway
* 221 Provincial Highway
* 222 County Highway
*
* Singapore Road Shield Tokens
* 225 Level 1 Roads
* 226 Level 3 Roads
*
* Malaysia Road Shield Tokens
* 230 Level 1 Roads
* 231 Level 3 Roads
*
* Autralia Road Shield Tokens
* 235 Freeway
* 236 Highway/ National
* 237 State
*
* New Zealand Road Shield Tokens
* 240 State
*
* South Africa Road Shield Tokens
* 245 National
* 246 Regional
* 247 Metro
*
* Exit sign information
* 1001 Exit number
* </pre>
*
* @return The Type
* @type int
*/
MQSign.prototype.getType = function(){
return this.getProperty("Type");
};
/**
* Sets Text.
* @param {String} text The Text
* @type void
*/
MQSign.prototype.setText = function(text){
this.setProperty("Text",text);
};
/**
* Gets Text.
* @return The Text
* @type String
*/
MQSign.prototype.getText = function(){
return this.getProperty("Text");
};
/**
* Sets ExtraText.
* @param {String} extraText The ExtraText
* @type void
*/
MQSign.prototype.setExtraText = function(extraText){
this.setProperty("ExtraText",extraText);
};
/**
* Gets ExtraText.
* @return The ExtraText
* @type String
*/
MQSign.prototype.getExtraText = function(){
return this.getProperty("ExtraText");
};
/**
* Sets Direction.
* @param {Long} direction The Direction
* @type void
*/
MQSign.prototype.setDirection = function(direction){
this.setProperty("Direction",direction);
};
/**
* Gets Direction.
* @return The Direction
* @type Long
*/
MQSign.prototype.getDirection = function(){
return this.getProperty("Direction");
};
// End class MQSign
// Begin class MQFeature
/* Inheirit from MQFeature */
MQFeature.prototype = new MQObject();
MQFeature.prototype.constructor = MQFeature;
/**
* Constructs a new MQFeature object.
* @class
* @extends MQObject
* @see MQPointFeature
* @see MQPolygonFeature
* @see MQLineFeature
*/
function MQFeature () {
MQObject.call(this);
}
/**
* Returns the text name of this class.
* @return The text name of this class.
* @type String
*/
MQFeature.prototype.getClassName = function(){
return "MQFeature";
};
/**
* Returns the version of this class.
* @return The version of this class.
* @type int
*/
MQFeature.prototype.getObjectVersion = function(){
return 0;
};
/**
* Gets Distance.
* @return The Distance value
* @type String
*/
MQFeature.prototype.getDistance = function(){
return this.getProperty("Distance");
};
/**
* Sets Distance.
* @param {Double} dblDistance The Distance value
* @type void
*/
MQFeature.prototype.setDistance = function(dblDistance){
this.setProperty("Distance",dblDistance);
};
/**
* Gets name.
* @return The name value
* @type String
*/
MQFeature.prototype.getName = function(){
return this.getProperty("Name");
};
/**
* Sets name.
* @param {String} strName The name value
* @type void
*/
MQFeature.prototype.setName = function(strName){
this.setProperty("Name",strName);
};
/**
* Gets sourceLayerName.
* @return The sourceLayerName value
* @type String
*/
MQFeature.prototype.getSourceLayerName = function(){
return this.getProperty("SourceLayerName");
};
/**
* Sets sourceLayerName.
* @param {String} strSourceLayerName The sourceLayerName value
* @type void
*/
MQFeature.prototype.setSourceLayerName = function(strSourceLayerName){
this.setProperty("SourceLayerName",strSourceLayerName);
};
/**
* Gets key.
* @return The key value
* @type String
*/
MQFeature.prototype.getKey = function(){
return this.getProperty("Key");
};
/**
* Sets key.
* @param {String} strKey The key value
* @type void
*/
MQFeature.prototype.setKey = function(strKey){
this.setProperty("Key",strKey);
};
/**
* Sets GEFID.
* @param {int} intGEFID the value to set GEFID to
* @type void
*/
MQFeature.prototype.setGEFID = function(intGEFID){
this.setProperty("GEFID",intGEFID);
};
/**
* Gets GEFID.
* @return The GEFID value
* @type int
*/
MQFeature.prototype.getGEFID = function(){
return this.getProperty("GEFID");
};
/**
* Sets DT.
* @param {int} intDT the value to set DT to
* @type void
*/
MQFeature.prototype.setDT = function(intDT){
this.setProperty("DT",intDT);
};
/**
* Gets DT.
* @return The DT value
* @type int
*/
MQFeature.prototype.getDT = function(){
return this.getProperty("DT");
};
// End class MQFeature
// Begin class MQPointFeature
/* Inheirit from MQPointFeature */
MQPointFeature.prototype = new MQFeature();
MQPointFeature.prototype.constructor = MQPointFeature;
/**
* Constructs a new MQPointFeature object.
* @class
* @extends MQFeature
* @see MQLatLng
* @see MQPoint
*/
function MQPointFeature () {
MQObject.call(this);
this.setM_XmlDoc(mqCreateXMLDocFromNode(MQXML.getPOINTFEATURE()));
this.setM_Xpath("PointFeature");
/**
* Value to represent the MQLatLng
* @type MQLatLng
*/
this.m_CenterLatLng = new MQLatLng("CenterLatLng");
/**
* Value to represent the MQPoint
* @type MQPoint
*/
this.m_CenterPoint = new MQPoint("CenterPoint");
}
/**
* Returns the text name of this class.
* @return The text name of this class.
* @type String
*/
MQPointFeature.prototype.getClassName = function(){
return "MQPointFeature";
};
/**
* Returns the version of this class.
* @return The version of this class.
* @type int
*/
MQPointFeature.prototype.getObjectVersion = function(){
return 0;
};
/**
* Assigns the xml that relates to this object.
* @param {String} strXml the xml to be assigned.
* @type void
*
*/
MQPointFeature.prototype.loadXml = function (strXml) {
this.setM_XmlDoc(mqCreateXMLDoc(strXml));
var latlng = this.getCenterLatLng();
var point = this.getCenterPoint();
var lnode = mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/CenterLatLng");
var pnode = mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/CenterPoint");
if(lnode !== null)
latlng.loadXmlFromNode(lnode);
if(pnode !== null)
point.loadXmlFromNode(pnode);
};
/**
* Assigns the xml that relates to this object.
* @param node {XML Node} of the document.
* @type void
* @private
*/
MQPointFeature.prototype.loadXmlFromNode = function (node) {
this.setM_XmlDoc(mqCreateXMLDocImportNode(node));
this.getCenterLatLng().setLatLng(this.getProperty("CenterLatLng/Lat"), this.getProperty("CenterLatLng/Lng"));
var x = this.getProperty("CenterPoint/X");
if(x!=="")
this.getCenterPoint().setXY(x, this.getProperty("CenterPoint/Y"));
};
/**
* Build an xml string that represents this object.
* @return The xml string.
* @type String
*
*/
MQPointFeature.prototype.saveXml = function () {
var newNode = mqCreateXMLDoc(this.getCenterLatLng().saveXml());
this.setM_XmlDoc(mqReplaceElementNode(this.getM_XmlDoc(), newNode, "CenterLatLng"));
newNode = mqCreateXMLDoc(this.getCenterPoint().saveXml());
this.setM_XmlDoc(mqReplaceElementNode(this.getM_XmlDoc(), newNode, "CenterPoint"));
return mqXmlToStr(this.getM_XmlDoc());
};
/**
* Returns the m_CenterLatLng object.
* @return The m_CenterLatLng object.
* @type MQLatLng
*/
MQPointFeature.prototype.getCenterLatLng = function() {
return this.m_CenterLatLng;
};
/**
* Sets the m_CenterLatLng object.
* @param {MQLatLng} latLng the MQLatLng to set m_CenterLatLng to.
* @type void
*/
MQPointFeature.prototype.setCenterLatLng = function(latLng) {
this.m_CenterLatLng.setLatLng(latLng.getLatitude(), latLng.getLongitude());
};
/**
* Returns the m_CenterPoint object.
* @return The m_CenterPoint object.
* @type MQPoint
*/
MQPointFeature.prototype.getCenterPoint = function() {
return this.m_CenterPoint;
};
/**
* Sets the m_CenterPoint object.
* @param {MQPoint} Point the MQPoint to set m_CenterPoint to.
* @type void
*/
MQPointFeature.prototype.setCenterPoint = function(Point) {
this.m_CenterPoint.setXY(Point.getX(), Point.getY());
};
// End class MQPointFeature
// Begin class MQPolygonFeature
/* Inheirit from MQPolygonFeature */
MQPolygonFeature.prototype = new MQPointFeature();
MQPolygonFeature.prototype.constructor = MQPolygonFeature;
/**
* Constructs a new MQPolygonFeature object.
* @class
* @extends MQFeature
* @see MQLatLng
* @see MQLatLngCollection
* @see MQPoint
* @see MQPointCollection
*/
function MQPolygonFeature () {
MQPointFeature.call(this);
this.setM_XmlDoc(mqCreateXMLDocFromNode(MQXML.getPOLYGONFEATURE()));
this.setM_Xpath("PolygonFeature");
/**
* Value to represent the MQLatLngCollection
* @type MQLatLngCollection
*/
var m_LatLngs = new MQLatLngCollection();
m_LatLngs.setM_Xpath("LatLngs");
/**
* Returns the m_LatLngs object.
* @return The m_LatLngs object.
* @type MQLatLngCollection
*/
this.getLatLngs = function() {
return m_LatLngs;
};
/**
* Sets the m_LatLngs object.
* @param {MQLatLngCollection} latLngs the MQLatLngCollection to set m_LatLngs to.
* @type void
*/
this.setLatLngs = function(latLngs) {
if (latLngs.getClassName()==="MQLatLngCollection"){
m_LatLngs.removeAll();
m_LatLngs.append(latLngs);
} else {
alert("failure in setLatLngs");
throw "failure in setLatLngs";
}
};
/**
* Value to represent the MQPointCollection
* @type MQPointCollection
*/
var m_Points = new MQPointCollection();
m_Points.setM_Xpath("Points");
/**
* Returns the m_Points object.
* @return The m_Points object.
* @type MQPointCollection
*/
this.getPoints = function() {
return m_Points;
};
/**
* Sets the m_Points object.
* @param {MQPointCollection} pts the MQPointCollection to set m_Points to.
* @type void
*/
this.setPoints = function(pts) {
m_Points.removeAll();
m_Points.append(pts);
};
}
/**
* Returns the text name of this class.
* @return The text name of this class.
* @type String
*/
MQPolygonFeature.prototype.getClassName = function(){
return "MQPolygonFeature";
};
/**
* Returns the version of this class.
* @return The version of this class.
* @type int
*/
MQPolygonFeature.prototype.getObjectVersion = function(){
return 0;
};
/**
* Assigns the xml that relates to this object.
* @param {String} strXml the xml to be assigned.
* @type void
*
*/
MQPolygonFeature.prototype.loadXml = function (strXml) {
this.setM_XmlDoc(mqCreateXMLDoc(strXml));
var latlng = this.getCenterLatLng();
if(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/CenterLatLng")!==null)
latlng.loadXml(mqXmlToStr(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/CenterLatLng")));
var point = this.getCenterPoint();
if(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/CenterPoint")!==null)
point.loadXml(mqXmlToStr(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/CenterPoint")));
var latlngs = this.getLatLngs();
if(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/LatLngs")!==null)
latlngs.loadXml(mqXmlToStr(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/LatLngs")));
var points = this.getPoints();
if(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/Points")!==null)
points.loadXml(mqXmlToStr(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/Points")));
};
/**
* Build an xml string that represents this object.
* @return The xml string.
* @type String
*
*/
MQPolygonFeature.prototype.saveXml = function () {
var newNode = mqCreateXMLDoc(this.getCenterLatLng().saveXml());
this.setM_XmlDoc(mqReplaceElementNode(this.getM_XmlDoc(), newNode, "CenterLatLng"));
newNode = mqCreateXMLDoc(this.getCenterPoint().saveXml());
this.setM_XmlDoc(mqReplaceElementNode(this.getM_XmlDoc(), newNode, "CenterPoint"));
newNode = mqCreateXMLDoc(this.getLatLngs().saveXml());
this.setM_XmlDoc(mqReplaceElementNode(this.getM_XmlDoc(), newNode, "LatLngs"));
newNode = mqCreateXMLDoc(this.getPoints().saveXml());
this.setM_XmlDoc(mqReplaceElementNode(this.getM_XmlDoc(), newNode, "Points"));
return mqXmlToStr(this.getM_XmlDoc());
};
// End class MQPolygonFeature
// Begin class MQLineFeature
/* Inheirit from MQLineFeature */
MQLineFeature.prototype = new MQPolygonFeature();
MQLineFeature.prototype.constructor = MQLineFeature;
/**
* Constructs a new MQLineFeature object.
* @class
* @extends MQFeature
* @see MQLatLng
* @see MQLatLngCollection
* @see MQPoint
* @see MQPointCollection
*/
function MQLineFeature () {
MQPolygonFeature.call(this);
this.setM_XmlDoc(mqCreateXMLDocFromNode(MQXML.getLINEFEATURE()));
this.setM_Xpath("LineFeature");
}
/**
* Returns the text name of this class.
* @return The text name of this class.
* @type String
*/
MQLineFeature.prototype.getClassName = function(){
return "MQLineFeature";
};
/**
* Returns the version of this class.
* @return The version of this class.
* @type int
*/
MQLineFeature.prototype.getObjectVersion = function(){
return 0;
};
/**
* Assigns the xml that relates to this object.
* @param {String} strXml the xml to be assigned.
* @type void
*
*/
MQLineFeature.prototype.loadXml = function (strXml) {
this.setM_XmlDoc(mqCreateXMLDoc(strXml));
var latlng = this.getCenterLatLng();
if(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/CenterLatLng")!==null)
latlng.loadXml(mqXmlToStr(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/CenterLatLng")));
var point = this.getCenterPoint();
if(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/CenterPoint")!==null)
point.loadXml(mqXmlToStr(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/CenterPoint")));
var latlngs = this.getLatLngs();
if(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/LatLngs")!==null)
latlngs.loadXml(mqXmlToStr(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/LatLngs")));
var points = this.getPoints();
if(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/Points")!==null)
points.loadXml(mqXmlToStr(mqGetNode(this.getM_XmlDoc(),"/" + this.getM_Xpath() + "/Points")));
};
/**
* Build an xml string that represents this object.
* @return The xml string.
* @type String
*
*/
MQLineFeature.prototype.saveXml = function () {
var newNode = mqCreateXMLDoc(this.getCenterLatLng().saveXml());
this.setM_XmlDoc(mqReplaceElementNode(this.getM_XmlDoc(), newNode, "CenterLatLng"));
newNode = mqCreateXMLDoc(this.getCenterPoint().saveXml());
this.setM_XmlDoc(mqReplaceElementNode(this.getM_XmlDoc(), newNode, "CenterPoint"));
newNode = mqCreateXMLDoc(this.getLatLngs().saveXml());
this.setM_XmlDoc(mqReplaceElementNode(this.getM_XmlDoc(), newNode, "LatLngs"));
newNode = mqCreateXMLDoc(this.getPoints().saveXml());
this.setM_XmlDoc(mqReplaceElementNode(this.getM_XmlDoc(), newNode, "Points"));
return mqXmlToStr(this.getM_XmlDoc());
};
/**
* Gets LeftPostalCode.
* @return The LeftPostalCode value
* @type String
*/
MQLineFeature.prototype.getLeftPostalCode = function(){
return this.getProperty("LeftPostalCode");
};
/**
* Sets LeftPostalCode.
* @param {String} strVal The LeftPostalCode value
* @type void
*/
MQLineFeature.prototype.setLeftPostalCode = function(strVal){
this.setProperty("LeftPostalCode",strVal);
};
/**
* Gets RightPostalCode.
* @return The RightPostalCode value
* @type String
*/
MQLineFeature.prototype.getRightPostalCode = function(){
return this.getProperty("RightPostalCode");
};
/**
* Sets RightPostalCode.
* @param {String} strVal The RightPostalCode value
* @type void
*/
MQLineFeature.prototype.setRightPostalCode = function(strVal){
this.setProperty("RightPostalCode",strVal);
};
/**
* Gets LeftAddressHi.
* @return The LeftAddressHi value
* @type String
*/
MQLineFeature.prototype.getLeftAddressHi = function(){
return this.getProperty("LeftAddressHi");
};
/**
* Sets LeftAddressHi.
* @param {String} strVal The LeftAddressHi value
* @type void
*/
MQLineFeature.prototype.setLeftAddressHi = function(strVal){
this.setProperty("LeftAddressHi",strVal);
};
/**
* Gets RightAddressHi.
* @return The RightAddressHi value
* @type String
*/
MQLineFeature.prototype.getRightAddressHi = function(){
return this.getProperty("RightAddressHi");
};
/**
* Sets RightAddressHi.
* @param {String} strVal The RightAddressHi value
* @type void
*/
MQLineFeature.prototype.setRightAddressHi = function(strVal){
this.setProperty("RightAddressHi",strVal);
};
/**
* Gets LeftAddressLo.
* @return The LeftAddressLo value
* @type String
*/
MQLineFeature.prototype.getLeftAddressLo = function(){
return this.getProperty("LeftAddressLo");
};
/**
* Sets LeftAddressLo.
* @param {String} strVal The LeftAddressLo value
* @type void
*/
MQLineFeature.prototype.setLeftAddressLo = function(strVal){
this.setProperty("LeftAddressLo",strVal);
};
/**
* Gets RightAddressLo.
* @return The RightAddressLo value
* @type String
*/
MQLineFeature.prototype.getRightAddressLo = function(){
return this.getProperty("RightAddressLo");
};
/**
* Sets RightAddressLo.
* @param {String} strVal The RightAddressLo value
* @type void
*/
MQLineFeature.prototype.setRightAddressLo = function(strVal){
this.setProperty("RightAddressLo",strVal);
};
// End class MQLineFeature
// Begin class MQLocation
/* Inheirit from MQLocation */
MQLocation.prototype = new MQObject();
MQLocation.prototype.constructor = MQLocation;
/**
* Constructs a new MQLocation object.
* @class Contains properties common to MQAddress
* objects. A MQLocation can also be geocoded, but only to the city
* level.
* @extends MQObject
*/
function MQLocation () {
MQObject.call(this);
this.setM_Xpath("Location");
}
/**
* Returns the text name of this class.
* @return The text name of this class.
* @type String
*/
MQLocation.prototype.getClassName = function(){
return "MQLocation";
};
/**
* Returns the version of this class.
* @return The version of this class.
* @type int
*/
MQLocation.prototype.getObjectVersion = function(){
return 0;
};
/**
* Assigns the xml that relates to this object.
* @param {String} strXml the xml to be assigned.
* @type void
*
*/
MQLocation.prototype.loadXml = function (strXml) {
this.setM_XmlDoc(mqCreateXMLDoc(strXml));
};
/**
* Build an xml string that represents this object.
* @return The xml string.
* @type String
*
*/
MQLocation.prototype.saveXml = function () {
return mqXmlToStr(this.getM_XmlDoc());
};
/**
* Gets admin area.
* @param {int} intIndex Which admin area (1 - 7)
* @return The admin area value for intIndex
* @type String
*/
// End class MQLocation
// Begin Class MQAddress
/* Inheirit from MQLocation */
MQAddress.prototype = new MQLocation();
MQAddress.prototype.constructor = MQAddress;
/**
* Constructs a new MQAddress object.
* @class Contains information for geocoding and routing to and from
* addresses.
* @extends MQLocation
*/
function MQAddress () {
MQLocation.call(this);
this.setM_Xpath("Address");
if(this.getClassName() === "MQAddress"){
this.setM_XmlDoc(mqCreateXMLDocFromNode(MQXML.getADDRESS()));
}
}
/**
* Returns the text name of this class.
* @return The text name of this class.
* @type String
*/
MQAddress.prototype.getClassName = function(){
return "MQAddress";
};
/**
* Returns the version of this class.
* @return The version of this class.
* @type int
*/
MQAddress.prototype.getObjectVersion = function(){
return 0;
};
/**
* Assigns the xml that relates to this object.
* @param {String} strXml the xml to be assigned.
* @type void
*
*/
MQAddress.prototype.loadXml = function (strXml) {
this.setM_XmlDoc(mqCreateXMLDoc(strXml));
};
/**
* Build an xml string that represents this object.
* @return The xml string.
* @type String
*
*/
MQAddress.prototype.saveXml = function () {
return mqXmlToStr(this.getM_XmlDoc());
};
/**
* Sets street.
* @param {String} strStreet street Address
* @type void
*/
MQAddress.prototype.getAdminArea = function(intIndex){
return this.getProperty("AdminArea" + intIndex);
};
/**
* Sets admin area.
* @param {int} intIndex Which admin area (1 - 7)
* @param {String} strAdminArea The admin area value for intIndex
* @type void
*/
MQAddress.prototype.setAdminArea = function(intIndex, strAdminArea){
this.setProperty("AdminArea" + intIndex,strAdminArea);
};
/**
* Gets country.
* @return The country value
* @type String
*/
MQAddress.prototype.getCountry = function(){
return this.getProperty("AdminArea1");
};
/**
* Sets country.
* @param {String} strCountry The country value
* @type void
*/
MQAddress.prototype.setCountry = function(strCountry){
this.setProperty("AdminArea1",strCountry);
};
/**
* Gets county.
* @return The county value
* @type String
*/
MQAddress.prototype.getCounty = function(){
return this.getProperty("AdminArea4");
};
/**
* Sets county.
* @param {String} strCounty The county value
* @type void
*/
MQAddress.prototype.setCounty = function(strCounty){
this.setProperty("AdminArea4",strCounty);
};
/**
* Gets city.
* @return The city value
* @type String
*/
MQAddress.prototype.getCity = function(){
return this.getProperty("AdminArea5");
};
/**
* Sets city.
* @param {String} strCity The city value
* @type void
*/
MQAddress.prototype.setCity = function(strCity){
this.setProperty("AdminArea5",strCity);
};
/**
* Gets postal code.
* @return The postal code value
* @type String
*/
MQAddress.prototype.getPostalCode = function(){
return this.getProperty("PostalCode");
};
/**
* Sets postal code.
* @param {String} strPostalCode The postal code value
* @type void
*/
MQAddress.prototype.setPostalCode = function(strPostalCode){
this.setProperty("PostalCode",strPostalCode);
};
/**
* Gets state.
* @return The state value
* @type String
*/
MQAddress.prototype.getState = function(){
return this.getProperty("AdminArea3");
};
/**
* Sets state.
* @param {String} strState The state value
* @type void
*/
MQAddress.prototype.setState = function(strState){
this.setProperty("AdminArea3",strState);
};
MQAddress.prototype.setStreet = function(strStreet){
this.setProperty("Street",strStreet);
};
/**
* Gets street.
* @return The street
* @type String
*/
MQAddress.prototype.getStreet = function(){
return this.getProperty("Street");
};
// End class MQAddress
// Begin Class MQSingleLineAddress
/* Inheirit from MQLocation */
MQSingleLineAddress.prototype = new MQLocation();
MQSingleLineAddress.prototype.constructor = MQSingleLineAddress;
/**
* Constructs a new MQSingleLineAddress object.
* @class Contains information for Singleline geocoding and routing to and from
* addresses.
* @extends MQLocation
*/
function MQSingleLineAddress () {
MQLocation.call(this);
this.setM_Xpath("SingleLineAddress");
if(this.getClassName() === "MQSingleLineAddress"){
this.setM_XmlDoc(mqCreateXMLDocFromNode(MQXML.getSINGLELINEADDRESS()));
}
}
/**
* Returns the text name of this class.
* @return The text name of this class.
* @type String
*/
MQSingleLineAddress.prototype.getClassName = function(){
return "MQSingleLineAddress";
};
/**
* Returns the version of this class.
* @return The version of this class.
* @type int
*/
MQSingleLineAddress.prototype.getObjectVersion = function(){
return 0;
};
/**
* Assigns the xml that relates to this object.
* @param {String} strXml the xml to be assigned.
* @type void
*
*/
MQSingleLineAddress.prototype.loadXml = function (strXml) {
this.setM_XmlDoc(mqCreateXMLDoc(strXml));
};
/**
* Build an xml string that represents this object.
* @return The xml string.
* @type String
*
*/
MQSingleLineAddress.prototype.saveXml = function () {
return mqXmlToStr(this.getM_XmlDoc());
};
/**
* Sets Address.
* @param {String} strAddress Singleline Address
* @type void
*/
MQSingleLineAddress.prototype.setAddress = function(strAddress){
this.setProperty("Address",strAddress);
};
/**
* Gets Country.
* @return The Country
* @type String
*/
MQSingleLineAddress.prototype.getAddress = function(){
return this.getProperty("Address");
};
MQSingleLineAddress.prototype.setCountry = function(strCountry){
this.setProperty("Country",strCountry);
};
/**
* Gets Country.
* @return The Country
* @type String
*/
MQSingleLineAddress.prototype.getCountry = function(){
return this.getProperty("Country");
};
// End class MQSingleLineAddress
// Begin Class MQGeoAddress
/* Inheirit from MQAddress */
MQGeoAddress.prototype = new MQAddress();
MQGeoAddress.prototype.constructor = MQGeoAddress;
/**
* Constructs a new MQGeoAddress object.
* @class Contains the results of geocoding an address.
* @extends MQAddress
* @see MQLocation
* @see MQAddress
* @see MQLatLng
*/
function MQGeoAddress () {
MQAddress.call(this);
this.setM_Xpath("GeoAddress");
this.setM_XmlDoc(mqCreateXMLDocFromNode(MQXML.getGEOADDRESS()));
/**
* Value to represent the MQLatLng
* @type MQLatLng
*
*/
var m_MQLatLng = new MQLatLn