[Cartoweb-users] RE: customize query tool and new tool in general

Oliver Christen oliver.christen at camptocamp.com
Thu Nov 29 06:45:12 EST 2007


layers[] is the variable of the layer tree, thats normal it contain all the actualy visible layers
the variable name of the query layers selection should be query_inquery[], not layers[] as you seems to have in your query template

regards
Oliver


  ----- Original Message ----- 
  From: karsten vennemann 
  To: cartoweb-users at lists.maptools.org 
  Sent: Wednesday, November 28, 2007 10:21 PM
  Subject: RE: [Cartoweb-users] RE: customize query tool and new tool in general


  Ok I successfully added the QueryByPoint tool to the tool bar (set weightQueryByPoint = 40 in query.ini), set displayExtendedSelection=true  and customized my query template query.tpl. 

   

  For right now I am working with checkboxes (like in CWDemo3) to select layers to be queried. When I use the QueryByPoint  I get the following trace of the ajax call (below) 

  The call refers to 3 layers (counties, roads, and people_in_institutions_per_tract):

   

  &layers[]=counties&layers[]=roads&layers[]=people_in_institutions_per_tract

   

  That happens even though I only checked the boxes for counties to be queried!
  The only way to only have counties appear in the call is when I switch off all layers except counties on the map.

  What do I have to change to fix this?

   

  Karsten

  -----------------------------

  Calling Query.Perform onBeforeAjaxCall()
  Calling AjaxPlugins.Common.onBeforeAjaxCall()
  Initiating AJAX request
  Pending actions: 1
  GET params:
  ajaxActionRequest=Query.Perform&
  POST params:
  posted=1&js_folder_idx=7&selection_type=point&selection_coords=1530642.8571428572,536571.428571352&features=&project=ocla&fake_reset=&fake_query=&outline_label_text=Yourlabel&recenter_doit=0&=&openNodes=&layers[]=counties&layers[]=roads&layers[]=people_in_institutions_per_tract&outline_mask=no&shortcut_doit=0&recenter_x=&recenter_y=&id_recenter_ids=&search_name=&search_config=countries&search_sort_column=&search_sort_direction=asc&search_number=&search_page=&query_layerid[]=counties&query_hilight[]=counties&query_attributes[]=counties&query_table[]=counties&query_layerid[]=people_in_institutions_per_tract&query_layerid[]=non_english_per_tract&recenter_scale=0&mapsize=0&shortcut_id=-1&search_country=GM&

  Waiting for response...
  Response received!
  Plugins that gave response: images query tables bboxHistory cartoMessages 
  Updating GUI for plugin Images

  AjaxHandler.updateDomElement(): Updating keymap element's src's value...Warning: given element (keymap) was not found in the DOM!
  AjaxHandler.updateDomElement(): Updating scalebar element's src's value...
  AjaxHandler.updateDomElement(): Updating map_drawing element's style.display's value...Updating GUI for plugin QueryUpdating GUI for plugin TablesAjaxHandler.updateDomElement(): Updating tables_result element's innerHTML's value...
  Updating GUI for plugin BboxHistory
  Updating GUI for plugin 

  CartoMessagesDeveloper messages: 2
  * mapResult returned from cache
  * array ( 'ajaxActionRequest' => 'Query.Perform', 'posted' => '1', 'js_folder_idx' => '7', 'selection_type' => 'point', 'selection_coords' => '1530642.8571428572,536571.428571352', 'features' => '', 'project' => 'ocla', 'fake_reset' => '', 'fake_query' => '', 'outline_label_text' => 'Your label', 'recenter_doit' => '0', 'openNodes' => '', 'layers' => array ( 0 => 'counties', 1 => 'roads', 2 => 'people_in_institutions_per_tract', ), 'outline_mask' => 'no', 'shortcut_doit' => '0', 'recenter_x' => '', 'recenter_y' => '', 'id_recenter_ids' => '', 'search_name' => '', 'search_config' => 'countries', 'search_sort_column' => '', 'search_sort_direction' => 'asc', 'search_number' => '', 'search_page' => '', 'query_layerid' => array ( 0 => 'counties', 1 => 'people_in_institutions_per_tract', 2 => 'non_english_per_tract', ), 'query_hilight' => array ( 0 => 'counties', ), 'query_attributes' => array ( 0 => 'counties', ), 'query_table' => array ( 0 => 'counties', ), 'recenter_scale' => '0', 'mapsize' => '0', 'shortcut_id' => '-1', 'search_country' => 'GM', 'LangCookie' => 'en', 'TestCookie' => 'OK', 'jsTrace' => '337px 264px 503px 715px', 'PHPSESSID' => '11508a0666ae177895e55e923d0a8989',)
  User messages: 0
  Calling Query.Perform onAfterAjaxCall()
  Calling AjaxPlugins.Common.onAfterAjaxCall()
  Clearing DHTML drawings...
  Clearing stored features...
  --- Action Query.Perform complete ---

   



------------------------------------------------------------------------------


  _______________________________________________
  Cartoweb-users mailing list
  Cartoweb-users at lists.maptools.org
  http://lists.maptools.org/mailman/listinfo/cartoweb-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20071129/2751ca38/attachment-0001.html


More information about the Cartoweb-users mailing list