[ka-Map-users] toggle layers?
Matthew Kane
markane at indiana.edu
Tue Jul 18 20:10:01 EDT 2006
Thanks again, Chris. I went ahead and applied some GROUPs to my mapfile and
things are working great. Indeed, there is a performance hit, but I'm not
working with more than a few layers at this time.
Really it's quite amazing how much functionality ka-map provides by default.
Strong kudos to the developers.
Matt
On 7/18/06, Chris Brown <chris at basebloc.com> wrote:
>
> Hi Matt,
>
>
>
> The functionality with the tick boxes in the reference box is standard
> ka-map functionality, if your layers are divided into groups within your map
> file, each group represented within that map file will be represented as a
> separate layer which can be turned on or off or have its Z position changed.
> Any layers that are not put into a GROUP will be put in a layer named Base.
>
> Try adding a the group code I gave you to one of the layers in your map
> file and then refresh your ka-map app to see what happens!
>
>
>
> Chris
>
>
> ------------------------------
>
> *From:* aiguy82 at gmail.com [mailto:aiguy82 at gmail.com] *On Behalf Of *Matthew
> Kane
> *Sent:* 19 July 2006 03:13
> *To:* Base Bloc
> *Cc:* ka-map-users at lists.maptools.org
> *Subject:* Re: [ka-Map-users] toggle layers?
>
>
>
> Thanks so much for your help, Chris.
>
> I'm not familiar with defining groups in mapfiles, but I think my question
> is more oriented towards javascript or dhtml. To be clearer about toggling
> layers, look at this page, where there are checkboxes down by the legend,
> where you can turn a layer on and off:
> http://geo.maunsell.com/kamapaus/aus.html
> In contrast, the following site doesn't have checkboxes by the legend:
> http://casoilresource.lawr.ucdavis.edu/kamap/
>
> My ka-map demo that I downloaded and configured is just like the second
> site I mention above. However, I'd like to be able to have those checkboxes
> in the legend so I can turn layers on and off. Is this a straightforward
> thing to do? Any help would be greatly appreciated.
>
> Thanks a lot,
> Matt
>
> On 7/17/06, *Base Bloc* <chris at basebloc.com> wrote:
>
> 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
>
>
>
>
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.10.1/391 - Release Date: 18/07/2006
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.10.1/391 - Release Date: 18/07/2006
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20060718/d927a131/attachment.html
More information about the ka-Map-users
mailing list