[ka-Map-users] queryable layers in ka-map 1.0b
Dylan Beaudette
dylan.beaudette at GMAIL.COM
Fri Oct 13 15:18:50 PDT 2006
Stinjia,
thanks for the suggestion, however the "queryable" test in startUp.js is still
insisting that there are no queryable layers, even after i added a GROUP
statement to my mapfile.
However, I found that if I have 2 distinct groups defined, one in which all
layers are queryable - then the query mechanism works without issue.
While this works, I am now forced to use PNG so that my "groups" do not cover
eachother in ka-map. i.e. i need to use TRANSPARENT ON , and PNG output
format. Is there anyway to stay with JPEG, AND have groups AND have them
overlay without obscuring eachother?
thanks in advance!
Cheers,
Dylan
On Thursday 12 October 2006 21:15, stinjia wrote:
> hi,dylan
> i think the problem may be here
> if(layers.length==0)
> in .map file,if no layer' group attribute be set,all layers are
> included in base layer,and layers.length=0,so you'd better group your data
> layer like this
>
> LAYER
> NAME mylayer
> GROUP "group1"
>
>
>
>
> stinjia
> 2006-10-13
>
>
>
> 发件人: Dylan Beaudette
> 发送时间: 2006-10-13 11:14:49
> 收件人: ka-map-users at lists.maptools.org
> 抄送:
> 主题: [ka-Map-users] queryable layers in ka-map 1.0b
>
> Greetings,
>
> I am a little confused about some of the wording in the requirements for
> making a layer 'queryable' in ka-map 1.0b:
>
> from kaMap.js :
>
> queryable - boolean, is the layer queryable?
> This is different from the layer being included in queries. bQueryable
> marks a layer as being capable of being queried. The layer also has to have
> it's query state turned on using setQueryable scales - array to containing
> the layer visibility for each scale
>
> I have included the METADATA section into my layer definition:
>
> METADATA
> #this must be enabled to use ka-Map! query - map_query.php
> "queryable" "true"
> END
>
>
> and each queryable layer has a template defined. Note that I am able to
> query these layers from an alternate DHTML interface to this same mapfile.
>
> When attempting to query one of these layers in ka-map, i get the message :
>
> "no queryable layers at this scale or extent"
>
> any thoughts on how to enable queries? So far I have followed the
> instructions on the wiki here:
>
> http://ka-map.ominiverdi.org/wiki/index.php/Query
>
>
> I am able to get queries to work if i comment out the check for
> layer "queryability" in the kaExplorer/startUp.js:
>
> function myQuery( eventID, queryType, coords ) {
> var szLayers = '';
> var layers = myKaMap.getCurrentMap().getQueryableLayers();
> if(layers.length==0) {
> // DEB changes
> // alert("No queryable layers at this scale and extent");
> // return;
> }
> for (var i=0;i <layers.length;i++) {
> szLayers = szLayers + "," + layers[i].name;
> }
>
> the application in question is here:
> http://casoilresource.lawr.ucdavis.edu/ka-map-1.0.b1-20060817/htdocs/?map=c
>asoil
>
> note that querying works- sort of: many features have to be queried by
> area...
>
> currently at a loss...
>
> cheers,
>
> Dylan
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341
More information about the MapServer-users
mailing list