What is ids in imagemap example?

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Thu Sep 28 20:50:05 EDT 2006


Please make sure the list is copied on responses so other can benefit 
from the issues and responses and so others can chime in with help.

Trimble, Beheen wrote:
> Thanks Stephen,
> 
> I wanted to know where it was getting populated and when was the first
> time it was called. I found out. 
> 
> However, now that you still are there, this is my problem:
> 
> I developed an application using the very first example of Mapserver
> that came with tutorial! This means: I can not change too many things
> now!
> 
> I want to have the tooltip capability, showing an attribute of any of
> the images that are displayed. I found all the codes and the examples
> and it runs fine with the example. However, I can not use them in my
> existing code! In all the tooltip examples, one submits a request and an
> html page with the coords or attributes for tooltip is displayed and
> then user mouseover that page (page already contains the attribute
> values!) In my case, I need to do the same thing after the page is
> loaded but not populated with the tooltip values. To make the story
> short, I want the tooltip effect when the below page is already
> displayed. Where can I put the tooltip code in this page?

Sounds like a logical impossibility if I understand your request. 
Mapserver generates the pages from templates and if you set them up 
correctly it populates the tool tips and image maps.

If you have a page that is generated without this information, then how 
do you expect it to generate a tool tip or hotspot on the page. Since it 
works in the demo, I would recommend updating you application to mimic 
that of the demo. You either have the information or you don't. If you 
don't then are you asking how to get it? like via an AJAX request? I'm 
confused, then again I might totally have missed the point of your question.

-Steve W

> Thanks a lot
> Beheen
> 
> 
> <html>
> <head>
> <title>Performance Measure Graphics Viewer</title>
> </head>
> 
> <script LANGUAGE="JavaScript">
> 
> function nueva(){
>   if (document.getElementById("mode").checked==false )
>   { document.getElementById("mapserver").target="_blank";}
>   else
>   { document.getElementById("mapserver").target="mapa"; }
>   }
> function init(){
>   window.name="mapa";
> }
> </script>
> 
> <body onLoad="init();" bgcolor="#ffffff">
> <center><h1>LECSR North Palm Beach - 2000 </h1></center>
> <hr>
> <form method="GET" id="mapserver" action="[program]" name="mapserv">
> <center>
> 
> <table border="0" cellspacing="0" cellpadding="4">
>   <tr>
>     <td valign="top" align="center">
>       <table width="390" border="0" cellspacing="0" cellpadding="4"
> align="center" bgcolor="#666666">
>         <tr>
>           <td align="center"><input type="image" name="img" src="[img]"
> width="[mapwidth]" height="[mapheight]" border="0" alt="This is a
> map"></td>
> </tr>
>         <tr>
>           <td bgcolor="#666666">
>             <img title="scalebar (mi)" alt="scalebar (mi)"
> src="[scalebar]">
>           </td>
>         </tr>
>       </table>
>     </td>
>     <td valign="top" bgcolor="#ffffff">
>       <table cellpadding="5" cellspacing="0" border="0"
> bgcolor="#ffffff">
>         <tr>
>           <td>
>             <center><input type="submit" value="Refresh/Query"></center>
>             <p>
>             <input type="radio" name="mode" value="browse" checked>
> <b>Browse map</b><br>
>             <input type="radio" name="mode" value="query"
> onClick="nueva();" > <b>Query feature</b><br>
>             <input type="radio" name="mode" value="nquery"
> onClick="nueva();" > <b>Query multiple features</b>
>             <hr>
>             <p>
>             <b>Select Layers to Display: </b><br>
>             <select multiple name="layer" size=3>
>               <option value="lecsr_subareas" [lecsr_subareas_select]>
> Lecsr Subareas
>               <option value="lecsr_budget" [lecsr_budget_select]> Lecsr
> Budget
>               <option value="lecsr_ir" [lecsr_ir_select]> Lecsr Ir
>               <option value="lecsr_gwstage" [lecsr_gwstage_select]>
> Lecsr Gwstage
>             </select>
>             <p>
>             Zoom In <input type=radio name=zoomdir value=1
> [zoomdir_1_check]>
>             Pan <input type=radio name=zoomdir value=0
> [zoomdir_0_check]>
>             Zoom Out <input type=radio name=zoomdir value=-1
> [zoomdir_-1_check]>
>             <p>
>             Zoom Size <input type=text name=zoomsize size=4
> value=[zoomsize]>
>             <p>
>             <b>Select a PMSet to Query: </b><br>
>             <select single name="pmset" size=2>
>               <option value="2000b 2050b alt2c alt2d"> 2000b 2050b alt2c
> alt2d
>             </select>
>             <p>
>             <font size=+1><b>Legend</b></font><br><hr>
>             <img src="[legend]"><hr>
>             <p>
>             <center><input name="ref" type="image" src="[ref]"
> border="0"></center>
>           </td>
>         </tr>
>       </table>
>     </td>
>   </tr>
> </table>
> </center>
> <input type="hidden" name="imgxy" value="[center]">
> <input type="hidden" name="imgext" value="[mapext]">
> <input type="hidden" name="map" value="[map]">
> <input type="hidden" name="root" value="[root]">
> <input type="hidden" name="savequery" value="true">
> <input type="hidden" name="program" value="[program]">
> <input type="hidden" name="map_web_imagepath"
> value="[map_web_imagepath]">
> <input type="hidden" name="map_web_imageurl" value="[map_web_imageurl]">
> <input type="hidden" name="map_web_template" value="[map_web_template]">
> </form>
> <p><hr><p>
> <a href="[root]/index.html">back to start</a><p>
> <i>[map_web_template]</i>
> </body></html>
> 
> 
> =========================== End of
> html====================================
>    
> -----Original Message-----
> From: Stephen Woodbridge [mailto:woodbri at swoodbridge.com] 
> Sent: Thursday, September 28, 2006 7:28 PM
> To: Trimble, Beheen; MapServer List
> Subject: Re: [UMN_MAPSERVER-USERS] What is ids in imagemap example?
> 
> These are variables that can be set via the mapserver cgi interface or 
> via a cookie. So in your case you could do something like:
> 
> http://localhost/cgi-bin/mapserv?mode=map&map=....&ids=123,456,789
> 
> and this would substitute into the %ids% string:
> 
> EXPRESSION ('[COUN]' in '123,456,789')
> 
> The exact syntax obvious needs to match the correctly to its usage.
> 
> -Steve W
> 
> Trimble, Beheen wrote:
>>
>> Randy,
>>
>>  
>>
>> It is ids  as in EXPRESSION ('[COUN]' in '%ids%')
>>
>>  
>>
>> I know COUN is an attribute in county shape file but I  don't know
> where 
>> the 'ids' variable is coming from and how it gets populated!
>>
>>  
>>
>>  
>>
>> Thanks
>>
>> Beheen
>>
>>  
>>
>>  
>>
>> * From: * Randy James [mailto:rjames57 at yahoo.com]
>> *Sent:* Thursday, September 28, 2006 5:03 PM
>> *To:* Trimble, Beheen
>> *Cc:* Mapserver Users
>> *Subject:* Re: [UMN_MAPSERVER-USERS] What is ids in imagemap example?
>>
>>  
>>
>> i believe id is the name of a variable, the two % show the start and
> the 
>> end of the variable.
>>
>> check out
>>
>>  
>>
>> http://umn.mapserver.ch/MapServer/en/syntax.htm
>>
>>  
>>
>> randy
>>
>> */" Trimble, Beheen " <btrimble at SFWMD.GOV>/* wrote:
>>
>>     Hey People,
>>
>>      
>>
>>     I am still trying to make the mouseover works in my application!
>>
>>      
>>
>>     Do you know what is %ids% in below map?  Where this is defined?
>>
>>      
>>
>>     Thanks
>>
>>     Beheen
>>
>>      
>>
>>      
>>
>>      
>>
>>      MAP   
>>
>>        NAME "TEST"   
>>
>>        SIZE 380 450   
>>
>>        EXTENT  180000 4816000 773000 5474000   
>>
>>        UNITS METERS   
>>
>>          
>>
>>        IMAGECOLOR 252 252 252   
>>
>>          
>>
>>        SHAPEPATH "/r01/data/drs"   
>>
>>          
>>
>>        FONTSET "/usr/local/mapserver/fonts/fonts.list"   
>>
>>          
>>
>>        WEB   
>>
>>          HEADER "templates/imagemap_header_example.html"   
>>
>>          FOOTER "templates/imagemap_footer_example.html"   
>>
>>          IMAGEPATH "/usr/local/www/docs_maps/tmp/"   
>>
>>          IMAGEURL "/tmp/"   
>>
>>        END   
>>
>>          
>>
>>        QUERYMAP   
>>
>>          STATUS ON   
>>
>>          STYLE     NORMAL       
>>
>>        END   
>>
>>          
>>
>>        LAYER   
>>
>>          NAME county   
>>
>>          STATUS OFF   
>>
>>          DATA "data/bdry_counpy2_gen500"   
>>
>>          TYPE   
>>
>>       POLYGON   
>>
>>          # LABELITEM "CTY_ABBR"   
>>
>>          CLASS   
>>
>>            EXPRESSION ('[COUN]' in '%ids%')   
>>
>>            STYLE    
>>
>>              COLOR "#BD9E5D" # "#A27528"    
>>
>>              OUTLINECOLOR 50 50 50    
>>
>>            END   
>>
>>          END   
>>
>>          CLASS   
>>
>>            COLOR 255 255 255   
>>
>>            OUTLINECOLOR 50 50 50    
>>
>>          END       
>>
>>          TEMPLATE "templates/county_example.html"   
>>
>>        END # counties   
>>
>>      END   
>>
>>      
>>
>>      
>>
>>  
>>
>>  
>>
>> Do you Yahoo!?
>> Everyone is raving about the all-new Yahoo! Mail. 
>>
> <http://us.rd.yahoo.com/evt=42297/*http:/advision.webevents.yahoo.com/ma
> ilbeta> 
>>
> 
> 
> 



More information about the mapserver-users mailing list