[mapserver-users] Mapplet and Mapsize
Stepan Kafka
stepan.kafka@centrum.cz
Thu, 7 Mar 2002 09:47:30 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_000D_01C1C5BD.195C1340
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Hi,
I am using sucessfuly this javascript code for changing the java applet
size without redrawing the page (I don´t use it for mapplet but I think it
will be functional for mapplet too):
mapplet.width = mapWidth;
mapplet.height = mapHeight;
mapplet.resize(mapWidth, mapHeight);
(mapWidth and mapHeight are the desired map sizes)
after it you must recalculate new map extent etc.. and redraw the map to
fill the new applet frame.
Good luck
Stepan Kafka
-----Puvodní zpráva-----
Od: owner-mapserver-users@lists.gis.umn.edu
[mailto:owner-mapserver-users@lists.gis.umn.edu]za uživatele Brian Fischer
Odesláno: 6. brezna 2002 21:42
Komu: mapserver-users@lists.gis.umn.edu
Predmet: [mapserver-users] Mapplet and Mapsize
Hi,
I am trying to add a drop down menu to automatically change the size of
the map. I am using Steve Lime’s mapplet and MapServ 3.5. I can not seem
to get the width and height changed in the applet using JavaScript. Is this
possible or do I have the syntax wrong?
function changemapsize() {
document.mapplet.width.value = "400" ;
document.mapplet.height.value = "300" ;
document.mapserv.submit();
}
<applet codebase="/tools/mapserv35/java/mapplet" code="mapplet.class"
name="mapplet" width="500" height="400" MAYSCRIPT >
<param name="image"
value="http://[host]/tools/mapserv35/temp_mapserv/[img]">
<param name="jitter" value="10">
<param name="thickness" value="2">
<param name="color" value="255,0,0">
<param name="name" value="mapplet">
</applet>
Thanks,
Brian
------=_NextPart_000_000D_01C1C5BD.195C1340
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:o =3D=20
"urn:schemas-microsoft-com:office:office" xmlns:w =3D=20
"urn:schemas-microsoft-com:office:word" xmlns:st1 =3D=20
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3DWord.Document name=3DProgId>
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<META content=3D"Microsoft Word 10" name=3DOriginator><LINK=20
href=3D"cid:filelist.xml@01C1C51D.1993BAC0" =
rel=3DFile-List><o:SmartTagType=20
name=3D"PersonName"=20
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"></o:SmartTagT=
ype><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<STYLE>st1\:* {
BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in =
1.25in; mso-header-margin: .5in; mso-footer-margin: .5in; =
mso-paper-source: 0; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
P.MsoAutoSig {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
LI.MsoAutoSig {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
DIV.MsoAutoSig {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: =
personal-compose; mso-style-noshow: yes; mso-ansi-font-size: 10.0pt; =
mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Arial; =
mso-hansi-font-family: Arial; mso-bidi-font-family: Arial
}
SPAN.SpellE {
mso-style-name: ""; mso-spl-e: yes
}
SPAN.GramE {
mso-style-name: ""; mso-gram-e: yes
}
DIV.Section1 {
page: Section1
}
</STYLE>
<!--[if gte mso 10]>
<style>
/* Style Definitions */=20
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]--></HEAD>
<BODY lang=3DEN-US style=3D"tab-interval: .5in" vLink=3Dpurple =
link=3Dblue>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D581142008-07032002>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D581142008-07032002> I am using sucessfuly this =
javascript code=20
for changing the java applet size without redrawing the page (I don=B4t =
use it=20
for mapplet but I think it will be functional for mapplet=20
too):</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D581142008-07032002></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D581142008-07032002>mapplet.width =3D mapWidth;<BR>mapplet.height =
=3D=20
mapHeight;<BR>mapplet.resize(mapWidth, mapHeight);</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D581142008-07032002></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D581142008-07032002>(mapWidth and mapHeight are the desired map=20
sizes)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D581142008-07032002> </DIV></SPAN></FONT>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D581142008-07032002>after=20
it you must recalculate new map extent etc.. and redraw the map to fill =
the new=20
applet frame.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D581142008-07032002></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D581142008-07032002>Good=20
luck</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D581142008-07032002></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D581142008-07032002>Stepan=20
Kafka</SPAN></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader><FONT face=3D"Times New Roman"=20
size=3D2>-----Původn=ED zpr=E1va-----<BR><B>Od:</B>=20
owner-mapserver-users@lists.gis.umn.edu=20
[mailto:owner-mapserver-users@lists.gis.umn.edu]<B>za u=9Eivatele</B> =
Brian=20
Fischer<BR><B>Odesl=E1no:</B> 6. března 2002 =
21:42<BR><B>Komu:</B>=20
mapserver-users@lists.gis.umn.edu<BR><B>Předmět:</B> =
[mapserver-users] Mapplet=20
and Mapsize<BR><BR></FONT></DIV>
<DIV class=3DSection1>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">Hi,<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">I am trying to add a =
drop down=20
menu to automatically change the size of the map.<SPAN=20
style=3D"mso-spacerun: yes"> </SPAN>I am using=20
</SPAN></FONT><st1:PersonName><st1:PersonName><FONT face=3DArial =
size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">Steve</SPAN></FONT></st1:PersonName><FONT=20
face=3DArial size=3D2><SPAN style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">=20
Lime</SPAN></FONT></st1:PersonName><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">=92s mapplet and MapServ =
3.5.<SPAN=20
style=3D"mso-spacerun: yes"> </SPAN>I can not seem to get the =
width and=20
height changed in the applet using JavaScript.<SPAN=20
style=3D"mso-spacerun: yes"> </SPAN>Is this possible or do I =
have the=20
syntax wrong?<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=3DMsoNormal><SPAN class=3DGramE><FONT face=3DArial =
size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">function</SPAN></FONT></SPAN><FONT=20
face=3DArial size=3D2><SPAN style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">=20
changemapsize() {<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN=20
style=3D"mso-spacerun: yes"> </SPAN>document.mapplet.width.value =
=3D=20
"400<SPAN class=3DGramE>" ;</SPAN><o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN=20
style=3D"mso-spacerun: yes"> =
</SPAN>document.mapplet.height.value =3D=20
"300<SPAN class=3DGramE>" ;</SPAN><o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN=20
style=3D"mso-spacerun: yes"> </SPAN><SPAN=20
=
class=3DGramE>document.mapserv.submit(</SPAN>);<o:p></o:p></SPAN></FONT><=
/P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN=20
style=3D"mso-spacerun: yes"> =
</SPAN>}<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><applet=20
codebase=3D"/tools/mapserv35/java/mapplet" code=3D"mapplet.class" =
name=3D"mapplet"=20
width=3D"500" height=3D"400" MAYSCRIPT =
><o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN=20
style=3D"mso-spacerun: =
yes"> &n=
bsp;=20
</SPAN><param name=3D"image" value=3D"http:/<SPAN=20
=
class=3DGramE>/[</SPAN>host]/tools/mapserv35/temp_mapserv/[img]"><o:p>=
</o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN=20
style=3D"mso-spacerun: =
yes"> &n=
bsp;=20
</SPAN><param name=3D"jitter" =
value=3D"10"><o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN=20
style=3D"mso-spacerun: =
yes"> &n=
bsp;=20
</SPAN><param name=3D"thickness" =
value=3D"2"><o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN=20
style=3D"mso-spacerun: =
yes"> &n=
bsp;=20
</SPAN><param name=3D"color" value=3D"255<SPAN =
class=3DGramE>,0,0</SPAN>">=20
<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN=20
style=3D"mso-spacerun: =
yes"> &n=
bsp;=20
</SPAN><param name=3D"name" =
value=3D"mapplet"><o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN=20
style=3D"mso-spacerun: =
yes"> =20
</SPAN></applet><o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">Thanks,<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal style=3D"mso-layout-grid-align: none"><B=20
style=3D"mso-bidi-font-weight: normal"><FONT face=3DArial =
size=3D2><SPAN=20
style=3D"FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial; =
mso-bidi-font-weight: normal; mso-no-proof: yes">Brian=20
</SPAN></FONT></B><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: =
12pt"><o:p> </o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML=
>
------=_NextPart_000_000D_01C1C5BD.195C1340--