[ka-Map-users] toggle layers?

Base Bloc chris at basebloc.com
Mon Jul 17 23:46:22 EDT 2006


Hi Matt,

 

The current query system is just an example of the variables available to
you with which to perform a query, if you want something other than the
alert box you will need to change the function myQuery() in startUp.js to
suit your needs, you could trigger a popup window and use for example the
extent to find points within the selected area by querying a MySQL or
PostGIS database. Or if you don't want pop-ups use getXMLHTTP() and other
functions in xhr.js (AJA'X') to fetch the results and display them in the
innerHTML of a DIV tag, you could then open and close the DIV tags
containing the data in the same way as has been done with the reference
panel, to see how this works look at the togglereference() function in
startup.js. 

 

As for the toggling of layers, I'm not sure what you mean? At present you
can turn on and off groups (Is this in the Wiki? I can't see it), to achieve
this you place layers in a map file into groups in your map file like so:

 

LAYER

  NAME "DEM"

  GROUP   "Base Map"

  DATA "dem_colour8bit.tif"

  TYPE RASTER

  STATUS ON

 

END

 

You could do this for every layer, but if it is done more than a couple of
times it can really effect performance on slower connections as when you add
a new group is doubles the number of tiles to be downloaded.

 

Hope this helps a little.

 

Chris

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20060718/a95ef43b/attachment.html


More information about the ka-Map-users mailing list