org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9115340A-5D15-4139-A236-945D199583AF.html
changeset 229 716254ccbcc0
equal deleted inserted replaced
228:913c9751c067 229:716254ccbcc0
       
     1 
       
     2 <!DOCTYPE html
       
     3   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     4 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="copyright" content="(C) Copyright 2009"/><meta name="DC.rights.owner" content="(C) Copyright 2009"/><meta name="DC.Type" content="mobileconcept"/><meta name="DC.Title" content="Calculation criteria"/><meta name="DC.Relation" scheme="URI" content="GUID-B1BFA47E-DAC0-40B1-898E-B3FCE14AE78F"/><meta name="DC.Relation" scheme="URI" content="GUID-7C69DDA4-16F1-4A8F-BDB2-4CB0015B4E81"/><meta name="DC.Relation" scheme="URI" content="GUID-65AAF569-D347-462B-B59A-9D7CA184AB9C"/><meta name="DC.Relation" scheme="URI" content="GUID-53CE4DE6-F065-4339-8C18-5C30A9540053"/><meta name="DC.Relation" scheme="URI" content="GUID-DBEE8177-7246-4FEE-A0F1-D6AEEA6EA206"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-9115340A-5D15-4139-A236-945D199583AF"/><title>Calculation criteria </title><script type="text/javascript">
       
     5       function initPage() {}
       
     6     </script><link href="../PRODUCT_PLUGIN/book.css" rel="stylesheet" type="text/css"/><link href="css/s60/style.css" rel="stylesheet" type="text/css" media="all"/></head><body onload="initPage();"><div class="body"><div class="contentLeft prTxt"><h1 class="pageHeading" id="GUID-9115340A-5D15-4139-A236-945D199583AF">Calculation <span>criteria</span></h1><div>
       
     7 <p>The <code>criteria</code> object specifies the mathematical
       
     8 operation to perform and the input values to use in the operation.</p>
       
     9 <p>The <a href="GUID-DBEE8177-7246-4FEE-A0F1-D6AEEA6EA206.html#GUID-DBEE8177-7246-4FEE-A0F1-D6AEEA6EA206"><code>Calculate</code></a> method
       
    10 supports the following operations:</p>
       
    11 <ul>
       
    12 <li><p><code>FindDistance</code></p>
       
    13 
       
    14 <p>This operation calculates the distance between two locations. The operation
       
    15 takes as input the coordinates of the source location and target location.
       
    16 The return value is the distance in meters.</p>
       
    17 
       
    18 </li>
       
    19 <li><p><code>FindBearingTo</code></p>
       
    20 
       
    21 <p>This operation calculates the bearing to a target location from a source
       
    22 location. The operation takes as input the coordinates of the source location
       
    23 and target location. The return value is the bearing in degrees counting clockwise
       
    24 relative to true north.</p>
       
    25 
       
    26 </li>
       
    27 <li><p><code>MoveCoordinates</code></p>
       
    28 
       
    29 <p>This operation calculates a new location based on movement from a source
       
    30 location. The operation takes as input the coordinates of the source location,
       
    31 the distance moved, and the direction of the movement. The return value consists
       
    32 of the coordinates of the new location.</p>
       
    33 
       
    34 </li>
       
    35 </ul>
       
    36 <p>The operations require different input parameters, as summarized in
       
    37 the following table. The properties that contain the input are described in
       
    38 detail in <a href="#GUID-65A57F20-7AC7-433C-ABD3-B838C147865A">Table:
       
    39 Criteria object properties</a>. The return values are described in section <a href="GUID-B1BFA47E-DAC0-40B1-898E-B3FCE14AE78F.html#GUID-B1BFA47E-DAC0-40B1-898E-B3FCE14AE78F">Calculation results</a>.</p>
       
    40 <div class="tablenoborder"><a name="GUID-544FDA8E-654F-47EA-B98C-CFC274F5D943"><!----></a><table cellpadding="4" cellspacing="0" summary="" id="GUID-544FDA8E-654F-47EA-B98C-CFC274F5D943" frame="border" border="1" rules="all"><caption><strong>Table: </strong>Supported operations
       
    41 and their input</caption>
       
    42 <thead align="left">
       
    43 <tr class="title "><th class="cellrowborder" valign="top" width="50%" id="d0e49092">
       
    44 <p>Operation</p>
       
    45 </th><th class="cellrowborder" valign="top" width="50%" id="d0e49097">
       
    46 <p>Input</p>
       
    47 </th></tr>
       
    48 </thead>
       
    49 <tbody>
       
    50 <tr class="">
       
    51 <td class="cellrowborder" valign="top" width="50%" headers="d0e49092 ">
       
    52 <p><code>FindDistance</code></p>
       
    53 </td>
       
    54 <td class="cellrowborder" valign="top" width="50%" headers="d0e49097 ">
       
    55 <p><code>DistanceParamSource</code></p>
       
    56 <p><code>DistanceParamDestination</code></p>
       
    57 </td>
       
    58 </tr>
       
    59 <tr class="bg ">
       
    60 <td class="cellrowborder" valign="top" width="50%" headers="d0e49092 ">
       
    61 <p><code>FindBearingTo</code></p>
       
    62 </td>
       
    63 <td class="cellrowborder" valign="top" width="50%" headers="d0e49097 ">
       
    64 <p><code>DistanceParamSource</code></p>
       
    65 <p><code>DistanceParamDestination</code></p>
       
    66 </td>
       
    67 </tr>
       
    68 <tr class="">
       
    69 <td class="cellrowborder" valign="top" width="50%" headers="d0e49092 ">
       
    70 <p><code>MoveCoordinates</code></p>
       
    71 </td>
       
    72 <td class="cellrowborder" valign="top" width="50%" headers="d0e49097 ">
       
    73 <p><code>DistanceParamSource</code></p>
       
    74 <p><code>MoveByThisDistance</code></p>
       
    75 <p><code>MoveByThisBearing</code></p>
       
    76 </td>
       
    77 </tr>
       
    78 </tbody>
       
    79 </table></div>
       
    80 <p/>
       
    81 <div class="note"><p><strong class="note_title">Note: </strong>If a longitude or latitude value in the input is outside the expected
       
    82 range (see the following table), the system attempts to correct the value
       
    83 automatically. For example, if longitude is set to +185 and latitude to +45,
       
    84 this is passed on as longitude -175 and latitude +45, since +185 is outside
       
    85 the expected longitude range of [+180.00, -180.00].</p>
       
    86 <p>Moreover, if a latitude value is outside the expected range, the system
       
    87 may need to adjust both the latitude and longitude to arrive at the correct
       
    88 coordinates. For example, if longitude is set to +10 and latitude to +95,
       
    89 a point on the Western hemisphere near the North Pole, these are adjusted
       
    90 to longitude -170 and latitude +85. In this case, it is necessary to adjust
       
    91 both values to maintain the correct location, even though only the original
       
    92 latitude value is outside the expected range. If only the latitude value were
       
    93 adjusted, the coordinates (longitude +10, latitude +85) would point to a location
       
    94 on the Eastern hemisphere.</p>
       
    95 </div>
       
    96 <p>The following table describes the properties of the <code>criteria</code> object. Properties enclosed
       
    97 in brackets are optional.</p>
       
    98 <div class="tablenoborder"><a name="GUID-65A57F20-7AC7-433C-ABD3-B838C147865A"><!----></a><table cellpadding="4" cellspacing="0" summary="" id="GUID-65A57F20-7AC7-433C-ABD3-B838C147865A" frame="border" border="1" rules="all"><caption><strong>Table: </strong><span>Criteria</span> object properties</caption>
       
    99 
       
   100 <thead align="left">
       
   101 <tr class="title "><th class="cellrowborder" valign="top" width="25%" id="d0e49211">
       
   102 <p>Property</p>
       
   103 </th><th class="cellrowborder" valign="top" width="25%" id="d0e49216">
       
   104 <p>Description</p>
       
   105 </th><th class="cellrowborder" valign="top" width="25%" id="d0e49221">
       
   106 <p>Type</p>
       
   107 </th><th class="cellrowborder" valign="top" width="25%" id="d0e49226">
       
   108 <p>Value</p>
       
   109 </th></tr>
       
   110 </thead>
       
   111 <tbody>
       
   112 <tr class="">
       
   113 <td class="cellrowborder" valign="top" width="25%" headers="d0e49211 ">
       
   114 <p><code>criteria.MathRequest</code></p>
       
   115 </td>
       
   116 <td class="cellrowborder" valign="top" width="25%" headers="d0e49216 ">
       
   117 <p>Specifies the mathematical operation to perform.</p>
       
   118 </td>
       
   119 <td class="cellrowborder" valign="top" width="25%" headers="d0e49221 ">
       
   120 <p>string</p>
       
   121 </td>
       
   122 <td class="cellrowborder" valign="top" width="25%" headers="d0e49226 ">
       
   123 <p>Possible values:</p>
       
   124 <ul>
       
   125 <li><p><code>"FindDistance"</code></p></li>
       
   126 <li><p><code>"FindBearingTo"</code></p></li>
       
   127 <li><p><code>"MoveCoordinates"</code></p></li>
       
   128 </ul>
       
   129 </td>
       
   130 </tr>
       
   131 <tr class="bg ">
       
   132 <td class="cellrowborder" valign="top" width="25%" headers="d0e49211 ">
       
   133 <p><code>criteria.DistanceParamSource</code></p>
       
   134 </td>
       
   135 <td class="cellrowborder" valign="top" width="25%" headers="d0e49216 ">
       
   136 <p>Specifies the coordinates of the source location.</p>
       
   137 <p>Use the <a href="http://en.wikipedia.org/wiki/World_Geodetic_System" target="_blank">WGS
       
   138 84 datum</a> with decimal degree representation to reference coordinates.</p>
       
   139 </td>
       
   140 <td class="cellrowborder" valign="top" width="25%" headers="d0e49221 ">
       
   141 <p>object</p>
       
   142 </td>
       
   143 <td class="cellrowborder" valign="top" width="25%" headers="d0e49226 ">
       
   144 <p>Object with the properties specified below</p>
       
   145 </td>
       
   146 </tr>
       
   147 <tr class="">
       
   148 <td class="cellrowborder" valign="top" width="25%" headers="d0e49211 ">
       
   149 <p><code>criteria.DistanceParamSource.Longitude</code></p>
       
   150 </td>
       
   151 <td class="cellrowborder" valign="top" width="25%" headers="d0e49216 ">
       
   152 <p>Specifies the longitude coordinate of the source location.</p>
       
   153 </td>
       
   154 <td class="cellrowborder" valign="top" width="25%" headers="d0e49221 ">
       
   155 <p>number</p>
       
   156 </td>
       
   157 <td class="cellrowborder" valign="top" width="25%" headers="d0e49226 ">
       
   158 <p>[+180.00, -180.00]</p>
       
   159 </td>
       
   160 </tr>
       
   161 <tr class="bg ">
       
   162 <td class="cellrowborder" valign="top" width="25%" headers="d0e49211 ">
       
   163 <p><code>criteria.DistanceParamSource.Latitude</code></p>
       
   164 </td>
       
   165 <td class="cellrowborder" valign="top" width="25%" headers="d0e49216 ">
       
   166 <p>Specifies the latitude coordinate of the source location.</p>
       
   167 </td>
       
   168 <td class="cellrowborder" valign="top" width="25%" headers="d0e49221 ">
       
   169 <p>number</p>
       
   170 </td>
       
   171 <td class="cellrowborder" valign="top" width="25%" headers="d0e49226 ">
       
   172 <p>[+90.00, -90.00]</p>
       
   173 </td>
       
   174 </tr>
       
   175 <tr class="">
       
   176 <td class="cellrowborder" valign="top" width="25%" headers="d0e49211 ">
       
   177 <p><code>criteria.DistanceParamSource.Altitude</code></p>
       
   178 </td>
       
   179 <td class="cellrowborder" valign="top" width="25%" headers="d0e49216 ">
       
   180 <p>Specifies the altitude coordinate of the source location.</p>
       
   181 <p>The altitude value does not affect the result of the calculation. It
       
   182 is included to maintain a uniform input argument.</p>
       
   183 </td>
       
   184 <td class="cellrowborder" valign="top" width="25%" headers="d0e49221 ">
       
   185 <p>number</p>
       
   186 </td>
       
   187 <td class="cellrowborder" valign="top" width="25%" headers="d0e49226 ">
       
   188 <p>Any integer or decimal</p>
       
   189 </td>
       
   190 </tr>
       
   191 <tr class="bg ">
       
   192 <td class="cellrowborder" valign="top" width="25%" headers="d0e49211 ">
       
   193 <p><code>[criteria.DistanceParamDestination]</code></p>
       
   194 </td>
       
   195 <td class="cellrowborder" valign="top" width="25%" headers="d0e49216 ">
       
   196 <p>Specifies the coordinates of the target location.</p>
       
   197 <p>This property and its child properties are required when <code>MathRequest</code> is
       
   198 set to <code>FindDistance</code> or <code>FindBearingTo</code>.</p>
       
   199 <p>Use the <a href="http://en.wikipedia.org/wiki/World_Geodetic_System" target="_blank">WGS
       
   200 84 datum</a> with decimal degree representation to reference coordinates.</p>
       
   201 </td>
       
   202 <td class="cellrowborder" valign="top" width="25%" headers="d0e49221 ">
       
   203 <p>object</p>
       
   204 </td>
       
   205 <td class="cellrowborder" valign="top" width="25%" headers="d0e49226 ">
       
   206 <p>Object with the properties specified below</p>
       
   207 </td>
       
   208 </tr>
       
   209 <tr class="">
       
   210 <td class="cellrowborder" valign="top" width="25%" headers="d0e49211 ">
       
   211 <p><code>[criteria.DistanceParamDestination.Longitude]</code></p>
       
   212 </td>
       
   213 <td class="cellrowborder" valign="top" width="25%" headers="d0e49216 ">
       
   214 <p>Specifies the longitude coordinate of the target location.</p>
       
   215 </td>
       
   216 <td class="cellrowborder" valign="top" width="25%" headers="d0e49221 ">
       
   217 <p>number</p>
       
   218 </td>
       
   219 <td class="cellrowborder" valign="top" width="25%" headers="d0e49226 ">
       
   220 <p>[+180.00, -180.00]</p>
       
   221 </td>
       
   222 </tr>
       
   223 <tr class="bg ">
       
   224 <td class="cellrowborder" valign="top" width="25%" headers="d0e49211 ">
       
   225 <p><code>[criteria.DistanceParamDestination.Latitude]</code></p>
       
   226 </td>
       
   227 <td class="cellrowborder" valign="top" width="25%" headers="d0e49216 ">
       
   228 <p>Specifies the latitude coordinate of the target location.</p>
       
   229 </td>
       
   230 <td class="cellrowborder" valign="top" width="25%" headers="d0e49221 ">
       
   231 <p>number</p>
       
   232 </td>
       
   233 <td class="cellrowborder" valign="top" width="25%" headers="d0e49226 ">
       
   234 <p>[+90.00, -90.00]</p>
       
   235 </td>
       
   236 </tr>
       
   237 <tr class="">
       
   238 <td class="cellrowborder" valign="top" width="25%" headers="d0e49211 ">
       
   239 <p><code>[criteria.DistanceParamDestination.Altitude]</code></p>
       
   240 </td>
       
   241 <td class="cellrowborder" valign="top" width="25%" headers="d0e49216 ">
       
   242 <p>Specifies the altitude coordinate of the target location.</p>
       
   243 <p>The altitude value does not affect the result of the calculation. It
       
   244 is included to maintain a uniform input argument.</p>
       
   245 </td>
       
   246 <td class="cellrowborder" valign="top" width="25%" headers="d0e49221 ">
       
   247 <p>number</p>
       
   248 </td>
       
   249 <td class="cellrowborder" valign="top" width="25%" headers="d0e49226 ">
       
   250 <p>Any integer or decimal</p>
       
   251 </td>
       
   252 </tr>
       
   253 <tr class="bg ">
       
   254 <td class="cellrowborder" valign="top" width="25%" headers="d0e49211 ">
       
   255 <p><code>[criteria.MoveByThisDistance]</code></p>
       
   256 </td>
       
   257 <td class="cellrowborder" valign="top" width="25%" headers="d0e49216 ">
       
   258 <p>Specifies the distance moved, that is, the distance between the source
       
   259 location and the new location. The distance is in meters.</p>
       
   260 <p>This property is required when <code>MathRequest</code> is set
       
   261 to <code>MoveCoordinates</code>.</p>
       
   262 </td>
       
   263 <td class="cellrowborder" valign="top" width="25%" headers="d0e49221 ">
       
   264 <p>number</p>
       
   265 </td>
       
   266 <td class="cellrowborder" valign="top" width="25%" headers="d0e49226 ">
       
   267 <p>Any integer or decimal</p>
       
   268 </td>
       
   269 </tr>
       
   270 <tr class="">
       
   271 <td class="cellrowborder" valign="top" width="25%" headers="d0e49211 ">
       
   272 <p><code>[criteria.MoveByThisBearing]</code></p>
       
   273 </td>
       
   274 <td class="cellrowborder" valign="top" width="25%" headers="d0e49216 ">
       
   275 <p>Specifies the direction of movement from the source location. The direction
       
   276 is expressed in degrees counting clockwise relative to true north.</p>
       
   277 <p>This property is required when <code>MathRequest</code> is set
       
   278 to <code>MoveCoordinates</code>.</p>
       
   279 </td>
       
   280 <td class="cellrowborder" valign="top" width="25%" headers="d0e49221 ">
       
   281 <p>number</p>
       
   282 </td>
       
   283 <td class="cellrowborder" valign="top" width="25%" headers="d0e49226 ">
       
   284 <p>Any integer or decimal</p>
       
   285 </td>
       
   286 </tr>
       
   287 </tbody>
       
   288 </table></div>
       
   289 <p/>
       
   290 </div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>