[ka-Map-users] cellSize
Paul Spencer
pspencer at dmsolutions.ca
Mon Sep 19 20:11:56 EDT 2005
Brent,
these values are available after ka-Map completes initialization.
Initialization starts when you call
myKaMap.initialize();
and completes when you receive the KAMAP_INITIALIZED event or the
KAMAP_MAP_INITIALIZED event. This is because initialization happens
asynchronously using an XmlHttpRequest call to a server side script,
init.php, to perform initialization.
so to get the cellsize, you would do the following:
myKaMap = new kaMap( 'viewport' );
myKaMap.registerForEvent( KAMAP_INITIALIZED, null, myInitialized );
function myInitialized( )
{
alert( myKaMap.cellSize );
}
Cheers
Paul
On 19-Sep-05, at 7:16 PM, Brent Pedersen wrote:
> hi,
> how do i get a kaMap object to know its cellSize right after it is
> created?
> currently, this:
>
> map = new kaMap('viewport');
> alert(map.cellSize)
>
> returns 'null'
>
> same with getCurrentScale. it seems these are only set after a zoom
> event?
> can i change that?
>
>
>
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
>
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+
More information about the ka-Map-users
mailing list