<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<html>
<head>
<title>
ka-Map Overview
</title>
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script>
function asd() {
parent.document.title="kaScalebar.js Overview";
}
</script>
</head>
<body bgcolor="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
<tr align="center" valign="top">
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a> </td>
<td bgcolor="#FFFFFF" class="NavBarCell1Rev"> <font class="NavBarFont1Rev"><b>File</b></font> </td>
<td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a> </td>
</tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top">
<em>
<b>ka-Map</b></em>
</td>
</tr>
<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
PREV
NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
<a href="index.html" target="_top"><b>FRAMES</b></a>
<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
<script>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->
<hr>
<center>
<h2>kaScalebar.js</h2>
</center>
<h4>Summary</h4>
<p>
No overview generated for 'kaScalebar.js'<BR/><BR/>
</p>
<hr>
<!-- ========== METHOD SUMMARY =========== -->
<a name="method_summary"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan=2>
<font size="+2">
<b>Method Summary</b>
</font>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static void</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!kaScalebar">kaScalebar</a></b>(oKaMap, szID )
</code>
<br>
kaScalebar
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static void</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!kaScalebar_update">kaScalebar_update</a></b>()
</code>
<br>
</td>
</tr>
</table>
<p>
<!-- ========== END METHOD SUMMARY =========== -->
<pre class="sourceview"><span class="comment">/**********************************************************************
*
* $Id: overview-summary-kaScalebar.js.html,v 1.1 2006/03/15 15:56:58 pspencer Exp $
*
* purpose: a mapserver-based scalebar. This still works but is more
* or less deprecated by scalebar (Tim Shcaub)
*
* author: Paul Spencer (pspencer<span class="attrib">@dmsolutions</span>.ca)
*
* The original kaScalebar code was written by DM Solutions Group.
*
* TODO:
*
* - remove from cvs because Tim's kick's ass!
*
**********************************************************************
*
* Copyright (c) 2005, DM Solutions Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
**********************************************************************/</span>
<span class="comment">/******************************************************************************
* kaScalebar
*
* internal class to handle the scalebar
*
* oKaMap - the ka-Map instance to draw the scalebar for
* szID - string, the id of a div that will contain the scalebar
*
*****************************************************************************/</span>
<span class="reserved">function</span> kaScalebar(oKaMap, szID <span class="comment">/*, szWidth, szHeight */</span>)
{
<span class="reserved">this</span>.kaMap = oKaMap;
<span class="reserved">this</span>.domObj = <span class="reserved">this</span>.kaMap.getRawObject(szID);
<span class="reserved">if</span> (arguments.length > 2)
{
szWidth = arguments[2];
}
<span class="reserved">else</span>
{
szWidth = <span class="reserved">this</span>.kaMap.getObjectWidth(szID);
}
<span class="reserved">if</span> (arguments.length > 3)
{
szHeight = arguments[3];
}
<span class="reserved">else</span>
{
szHeight = <span class="reserved">this</span>.kaMap.getObjectHeight(szID);
}
<span class="comment">//create an image to hold the scalebar</span>
<span class="reserved">this</span>.domImg = document.createElement( <span class="literal">'img'</span> );
<span class="reserved">this</span>.domImg.width = szWidth;
<span class="reserved">this</span>.domImg.height = szHeight;
<span class="reserved">this</span>.domImg.style.width = szWidth + <span class="literal">'px'</span>;
<span class="reserved">this</span>.domImg.style.height = szHeight + <span class="literal">'px'</span>;
<span class="reserved">this</span>.domImg.src = <span class="reserved">this</span>.kaMap.aPixel.src;
<span class="reserved">this</span>.domObj.appendChild( <span class="reserved">this</span>.domImg );
<span class="comment">//prototypes</span>
<span class="reserved">this</span>.update = kaScalebar_update;
<span class="reserved">this</span>.kaMap.registerForEvent( KAMAP_SCALE_CHANGED, <span class="reserved">this</span>, <span class="reserved">this</span>.update );
<span class="reserved">this</span>.kaMap.registerForEvent( KAMAP_MAP_INITIALIZED, <span class="reserved">this</span>, <span class="reserved">this</span>.update );
}
<span class="reserved">function</span> kaScalebar_update()
{
var scale = <span class="reserved">this</span>.kaMap.getCurrentScale();
<span class="reserved">this</span>.domImg.src = <span class="reserved">this</span>.kaMap.server + <span class="literal">'/scalebar.php?map='</span>+
<span class="reserved">this</span>.kaMap.currentMap+<span class="literal">'&scale='</span>+scale;
}
</pre>
<hr>
<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
<tr align="center" valign="top">
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a> </td>
<td bgcolor="#FFFFFF" class="NavBarCell1Rev"> <font class="NavBarFont1Rev"><b>File</b></font> </td>
<td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a> </td>
</tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top"><em>
<b>ka-Map</b></em>
</td>
</tr>
<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
PREV
NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
<a href="index.html" target="_top"><b>FRAMES</b></a>
<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
<script>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->
<hr>
<font size="-1">
</font>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Wed Mar 15 10:50:59 2006</div>
</body>
</html>