[ka-Map-users] getting to list of layers

Paul Spencer pspencer at dmsolutions.ca
Wed Sep 21 16:11:40 EDT 2005


Charlton,

I'm working on providing a mechanism for making layers queryable or  
not queryable and for including/not including queryable layers in a  
given query but its not done yet.

For now, you can get a list of all the layers (which are actually  
groups unless you've changed things around) by calling

var oMap = myKaMap.getCurrentMap();
var aLayers = oMap.getLayers();
alert(aLayers.toString());

Cheers

Paul

On 21-Sep-05, at 3:36 PM, Charlton Purvis wrote:

> Hi, folks:
>
> I'm a novice w/ JS, so I'm sure this is a -101 question (give me  
> Perl and/or
> PHP anytime).
>
> I want to be able to get to the list of layers that are active now  
> that I'm
> using the latest CVS that provides the nice myQuery out of the  
> box.  The
> params passed to it are the eventID, queryType, and coords.  I'd  
> also like
> to get hold of the active layers so that I know what results to  
> return.
>
> Poking around I see something like . . .
>
>   var layers = oMap.getLayers();
>
> . . . but I don't think I understand the scope/inheritance of JS  
> because it
> doesn't like it when I plug that inside of the myQuery function in
> index.html.  I've tried myKaMap.getLayers(), but no dice there,  
> either.
>
> Any help appreciated.
>
> Charlton
>
> _______________________________________________
> 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