It ain't pretty but it works

Gary Watry watry at STEAM.COAPS.FSU.EDU
Fri Aug 11 07:21:50 PDT 2006


Thanks it works great

LESSARDST at dfo-mpo.gc.ca wrote:
> Hello Gary,
>
> For changeMonth, try something like:
>
> {
> var longMonth=new Array()
> longMonth[0]="January"
> longMonth[1]="February"
> longMonth[2]="March"
> longMonth[3]="April"
> longMonth[4]="May"
> longMonth[5]="June"
> longMonth[6]="July"
> longMonth[7]="August"
> longMonth[8]="September"
> longMonth[9]="October"
> longMonth[10]="November"
> longMonth[11]="December"
>
> var shortMonth=new Array()
> shortMonth[0]="Jan"
> shortMonth[1]="Feb"
> shortMonth[2]="Mar"
> shortMonth[3]="Apr"
> shortMonth[4]="May"
> shortMonth[5]="Jun"
> shortMonth[6]="Jul"
> shortMonth[7]="Aug"
> shortMonth[8]="Sep"
> shortMonth[9]="Oct"
> shortMonth[10]="Nov"
> shortMonth[11]="Dec"
> var i = document.Month.Months.selectedIndex;
>
>   WindRoseWindow=window.open("",
> "WindRose","toolbar=1,status=1,scrollbars=1,menubar=1,width=800,height=500,a
> lwaysRaised=1,resizeable=1");
>   WindRoseWindow.moveTo(0,0);
>   WindRoseWindow.document.write('<table border="0" bgcolor="#FFD700"
> width="100%"><tr><td colspan="2">');
>   WindRoseWindow.document.write('<b><center>Click on' + longMonth[i] + '
> Wind Rose Graph to Zoom In</b></center>');
>   WindRoseWindow.document.write('</td></tr></table><table
> width="100%"<tr><td>');
>   WindRoseWindow.document.write('<center><a
> href="http://www.coaps.fsu.edu/gis/coastal/wind_climo/724640' +
> shortMonth[i] + 'A.gif"><img
> src="http://www.coaps.fsu.edu/gis/coastal/wind_climo/724640' + shortMonth[i]
> + 'A.gif" height="180" width="240"/></a><br>All</center>');
>   WindRoseWindow.document.write('</td><td>');
>   WindRoseWindow.document.write('<center><a
> href="http://www.coaps.fsu.edu/gis/coastal/wind_climo/724640' +
> shortMonth[i] + 'W.gif"><img
> src="http://www.coaps.fsu.edu/gis/coastal/wind_climo/724640' + shortMonth[i]
> + 'W.gif" height="180" width="240"/></a><br>El Nino (Warm)</center>');
>   WindRoseWindow.document.write('</td></tr><tr><td>');
>   WindRoseWindow.document.write('<center><a
> href="http://www.coaps.fsu.edu/gis/coastal/wind_climo/724640' +
> shortMonth[i] + 'N.gif"><img
> src="http://www.coaps.fsu.edu/gis/coastal/wind_climo/724640' + shortMonth[i]
> + 'N.gif" height="180" width="240"/></a><br>Neutral</center>');
>   WindRoseWindow.document.write('</td><td>');
>   WindRoseWindow.document.write('<center><a
> href="http://www.coaps.fsu.edu/gis/coastal/wind_climo/724640' +
> shortMonth[i] + 'C.gif"><img
> src="http://www.coaps.fsu.edu/gis/coastal/wind_climo/724640' + shortMonth[i]
> + 'C.gif" height="180" width="240"/></a><br>La Nina (Cold)</center>');
>   WindRoseWindow.document.write('</td></tr></table><table width="100%"
> bgcolor="#FFD700"><tr><td colspan="2">');
>   WindRoseWindow.document.write('<a
> href="javascript:window.close();"><center><b>Close</b></center></a>');
>   WindRoseWindow.document.write('</td></tr></table>');
> }
>
>
> Hope this helps 
>
> Stephane Lessard
>
>   
>> -----Message d'origine-----
>> De : UMN MapServer Users List 
>> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] De la part de Gary Watry
>> Envoyé : 10 août 2006 11:30
>> À : MAPSERVER-USERS at LISTS.UMN.EDU
>> Objet : [UMN_MAPSERVER-USERS] It ain't pretty but it works
>>
>> Hi
>>
>> The site is
>> http://gisdev.coaps.fsu.edu/httpdocs/windrose.php
>>
>> It will run slow as it has not been moved to a production 
>> server Click on "get Info From Map"
>> Click over red star (any one will do)
>> Select a month in drop-down list (any will do) The issue is I 
>> had to repeat a block of code over and over again, 
>> programming by brute force (does anyone know of a better way 
>> than repeating the code in the
>>
>> function ChangeMonth()  {
>>
>> The other question is can I query a shapefile from a test box.
>> I want to be able to type in a USAFID number and have it zoom 
>> into that location and then open the form without having to 
>> click on the map.
>>
>> Any thoughts
>>
>> --
>> Gary L. Watry
>> GIS Coordinator
>> Center for Ocean-Atmospheric Prediction Studies FSU / COAPS 
>> Johnson Building, RM 215
>> 2035 East Paul Dirac Drive
>> Tallahassee, Florida 32306-2840
>>
>> Phone (850) 645-7457
>>
>> E-Mail: watry at coaps.fsu.edu
>>
>>     
>
>   

-- 
Gary L. Watry
GIS Coordinator
Center for Ocean-Atmospheric Prediction Studies
FSU / COAPS
Johnson Building, RM 215
2035 East Paul Dirac Drive
Tallahassee, Florida 32306-2840

Phone (850) 645-7457

E-Mail: watry at coaps.fsu.edu



More information about the MapServer-users mailing list