This commit is contained in:
bastianonm 2012-01-28 12:02:33 +00:00
parent f068278fe0
commit e75ced973d
4 changed files with 7 additions and 7 deletions

View File

@ -56,9 +56,9 @@ The attributes are:
1. donotreducegpx: Print all the point without reduce it (default is FALSE)
1. pointsoffset: Skip points closer than XX meters(default is 10)
1. pointsoffset: Skip points closer than XX metres(default is 10)
1. uom: the unit of measure values are: 0, 1 (0 = meters, 1 = miles/feet)
1. uom: the unit of measure values are: 0, 1 (0 = metres, 1 = miles/feet)
1. mlinecolor: map line color (default is #3366cc)

View File

@ -220,7 +220,7 @@
{
$alpha = (float)sin((float)toRadians((float) $lat2 - (float) $lat1) / 2);
$beta = (float)sin((float)toRadians((float) $lon2 - (float) $lon1) / 2);
//Distance in meters
//Distance in metres
$a = (float) ( (float)$alpha * (float)$alpha) + (float) ( (float)cos( (float)toRadians($lat1)) * (float)cos( (float)toRadians($lat2)) * (float)$beta * (float)$beta );
$dist = 2 * 6369628.75 * (float)atan2((float)sqrt((float)$a), (float)sqrt(1 - (float) $a));
$d = (float)sqrt((float)pow((float)$dist, 2) + pow((float) $lat1 - (float)$lat2, 2));

View File

@ -91,8 +91,8 @@ function WP_GPX_Maps_html_page() {
<li><b>mtype</b>: map aviable types are: HYBRID, ROADMAP, SATELLITE, TERRAIN</li>
<li><b>waypoints</b>: print the gpx waypoints inside the map (default is FALSE)</li>
<li><b>donotreducegpx</b>: Print all the point without reduce it (default is FALSE)</li>
<li><b>pointsoffset</b>: Skip points closer than XX meters(default is 10)</li>
<li><b>uom</b>: the unit of measure values are: 0, 1 (0 = meters, 1 = miles/feet)</li>
<li><b>pointsoffset</b>: Skip points closer than XX metres(default is 10)</li>
<li><b>uom</b>: the unit of measure values are: 0, 1 (0 = metres, 1 = miles/feet)</li>
<li><b>mlinecolor</b>: map line color (default is #3366cc)</li>
<li><b>glinecolor</b>: graph line color (default is #3366cc)</li>
</ul>

View File

@ -51,7 +51,7 @@
<th scope="row">Unit of measure:</th>
<td>
<select name='wpgpxmaps_unit_of_measure'>
<option value="0" <?php if ($uom == '0') echo 'selected'; ?>>meters</option>
<option value="0" <?php if ($uom == '0') echo 'selected'; ?>>metres</option>
<option value="1" <?php if ($uom == '1') echo 'selected'; ?>>miles/feet</option>
</select>
</td>
@ -73,7 +73,7 @@
<td>
<br />
<b>Do not edit if you don't know what you are doing!</b><br />
<i>Skip points closer than </i> <input name="wpgpxmaps_pointsoffset" type="text" id="wpgpxmaps_pointsoffset" value="<?php echo $po ?>" style="width:50px;" /><i>meters</i>.
<i>Skip points closer than </i> <input name="wpgpxmaps_pointsoffset" type="text" id="wpgpxmaps_pointsoffset" value="<?php echo $po ?>" style="width:50px;" /><i>metres</i>.
<input name="wpgpxmaps_donotreducegpx" type="checkbox" value="true" <?php if($donotreducegpx == true){echo('checked');} ?> onchange="this.value = (this.checked)" /><i>Do not reduce gpx</i>.
</td>
</tr>