|
||||
[maplab-users] How to set which layers to query in MapBrowserWilliam A. Bronsema, C.E.T. bronsema@dmsolutions.caWed, 06 Nov 2002 08:56:03 -0500
|
For the benefit of all MapLab users: A user asked how to modify MapBrowser to query only certain layers. Here is the answer: ....... Yes, you are correct, we changed MapBrowser to query all visible layers. This feature has been setup to be easily modified. Are you familiar with programming in PHP? I will briefly outline how to make this change in RC3, if you need more detailed instructions please let me know. The map is drawn by a php page called drawmap.php. It is setup to to accept a parameter called "gszQueryLayers" which is a comma delimited string of layer indexes to query. All you need to do is pass this parameter to drawmap.php when it is called. To do this you only need to modify one file, <path to maplabRC3>/htdocs/mapbrowser/map.php. Around line 828 you will find the following lines of code: // set the drawmap.php's location $szLocation = COMMON."wrapper/drawmap.php?".SID. "&map_session_mode=1&run_query=".$nRunQuery."&gszQueryCoords=". $szInputCoords."&bob=".md5(uniqid(rand(),1)); You need to insert the following code: &gszQueryLayers=0,1 Change the 0,1 to be the indexes of the layers that you wish to query. The resulting code should look something like this: // set the drawmap.php's location $szLocation = COMMON."wrapper/drawmap.php?".SID. "&map_session_mode=1&run_query=".$nRunQuery."&gszQueryLayers=0,1&gszQueryCoords=". $szInputCoords."&bob=".md5(uniqid(rand(),1)); ........ I will be posting this to the wiki shortly. Regards, Bill -- ____________________________________________________________________ William A. Bronsema, C.E.T. DM Solutions Group Inc. Applications Developer http://www.dmsolutions.ca ____________________________________________________________________ The ancestry of every action is a thought - Ralph Waldo Emerson
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |