[ka-Map-users] selectMap and zoomTo at same time
Paul Spencer
pspencer at dmsolutions.ca
Tue Mar 21 07:48:34 EST 2006
What version of ka-Map are you using? Looking at the current CVS
version, it doesn't seem like this should be a problem since
selectMap doesn't make an asynchronous call? Also, you could modify
the current extents of the map before calling selectMap to avoid the
zoomTo step:
var aMaps = myKaMap.getMaps();
for (var i=0; i<aMaps.length; i++) {
if (aMaps[i].name == theName) {
aMaps[i].setCurrentExtents(minx,miny,maxx,maxy);
myKaMap.selectMap(theName);
break;
}
}
Cheers
Paul
On 21-Mar-06, at 4:09 AM, Adrian Strahan wrote:
> Can anyone help me? - I'm trying to get KaMap to change map (using
> the selectMap function) and change location (using the zoomTo
> function) at the same time.
> But it seems that by the time the map has changed, the zoomTo
> function has been executed and is therefore ignored.
> I guess this is down to trying to call two asynchronous functions
> in a synchronous way using Javascript.
> Any help on this would be most appreciated.
>
> _______________________________________________
> 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