[Mapserver-users] dhtml refresh getscale() and latlong
Stephen Clark
stephen.clark at focus.ca
Mon Nov 10 11:20:05 PST 2003
This is a multi-part message in MIME format.
------=_NextPart_000_00BD_01C3A77C.97A6F330
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MessageAmy,
My guess is that the problem is in your javascript. Which tool are you =
using mapplet of jbox?
As far as I know the whole page must refresh to get the scale returned =
but other on the list may be more helpful.
Stephen
----- Original Message -----=20
From: Amy.Stender at erdc.usace.army.mil=20
To: stephen.clark at focus.ca=20
Sent: Monday, November 10, 2003 9:55 AM
Subject: RE: [Mapserver-users] dhtml refresh getscale() and latlong
I'm behind a firewall, so I don't really know where to post it to. =
I've pasted the mapfile (except layers) below, though...
I have javascript that formats the raw scale into a rounded, comma =
number but it's this number that isn't refreshing because the whole page =
doesn't reload when the user zooms in, just the map area...
#
# Start of Map File
#
NAME alaska
STATUS ON
SIZE 500 400
EXTENT -2168806 410152 1491776 2378649
SHAPEPATH /my_shape_path/
IMAGECOLOR 135 206 235
TRANSPARENT off
UNITS meters
SYMBOLSET /my_symbol_path/
FONTSET /my_font_list/
PROJECTION
"proj=3Daea"
"units=3Dm"
"lat_1=3D55"
"lat_2=3D65"
"lat_0=3D50"
"lon_0=3D-154"
"x_0=3D0"
"y_0=3D0"
END
WEB
TEMPLATE "alaska.html"
IMAGEPATH "/html/"=20
IMAGEURL "/tmp/"
END
QUERYMAP
COLOR 255 255 0
STATUS on
STYLE hilite
END
LEGEND
IMAGECOLOR 255 255 255
KEYSIZE 18 12
LABEL
TYPE TRUETYPE
FONT "tahoma"
SIZE 8
COLOR 0 0 0
END
STATUS on
END
SCALEBAR
STYLE 0
IMAGECOLOR 255 255 255
LABEL
FONT "tahoma"
COLOR 0 0 0
SIZE tiny
BUFFER 3
BACKGROUNDCOLOR 255 255 255
END
SIZE 120 4
COLOR 255 255 255
BACKGROUNDCOLOR 0 0 0
OUTLINECOLOR 0 0 0
UNITS miles
INTERVALS 4
STATUS on
TRANSPARENT true
END
LAYERS...
END #end mapfile
-----Original Message-----
From: Stephen Clark [mailto:stephen.clark at focus.ca]=20
Sent: Monday, November 10, 2003 1:34 PM
To: Amy.Stender at erdc.usace.army.mil
Subject: Re: [Mapserver-users] dhtml refresh getscale() and latlong
post your *.map file.
You could also use the [scale] value returned from the mapserver =
application in your getscale() function.
stephen
----- Original Message -----=20
From: Amy.Stender at erdc.usace.army.mil=20
To: mapserver-users at lists.gis.umn.edu=20
Sent: Monday, November 10, 2003 7:50 AM
Subject: [Mapserver-users] dhtml refresh getscale() and latlong
Anyone know how to refresh getscale() and window.status when the =
map is refreshed in dhtml?
At the bottom of my map, I have the starting scale (1:20,000,000) =
but's not updated when the user zooms in. It's static. Same thing with =
my lat/long. The initial lat/long is correct, but it doesn't change =
after the user zooms in.
Any help would be greatly appreciated.
Thanks,
Amy
Amy L. Stender=20
Remote Sensing/GIS Center=20
Cold Regions Research and Engineering Laboratory=20
United States Army Corps of Engineers=20
72 Lyme Road, Hanover, NH 03755-1290=20
Tel:(603)646-4733 Fax:(603) 646-4730=20
Amy.Stender at erdc.usace.army.mil
------=_NextPart_000_00BD_01C3A77C.97A6F330
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Amy,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>My guess is that the problem is in your =
javascript. Which tool are you using mapplet of jbox?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>As far as I know the whole page must =
refresh to get=20
the scale returned but other on the list may be more =
helpful.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Stephen</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A title=3DAmy.Stender at erdc.usace.army.mil=20
=
href=3D"mailto:Amy.Stender at erdc.usace.army.mil">Amy.Stender at erdc.usace.ar=
my.mil</A>=20
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3Dstephen.clark at focus.ca=20
href=3D"mailto:stephen.clark at focus.ca">stephen.clark at focus.ca</A> =
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, November 10, 2003 =
9:55=20
AM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> RE: [Mapserver-users] =
dhtml=20
refresh getscale() and latlong</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff size=3D2>I'm=20
behind a firewall, so I don't really know where to post it to. I've =
pasted the=20
mapfile (except layers) below, though...</FONT></SPAN></DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff size=3D2>I=20
have javascript that formats the raw scale into a rounded, comma =
number but=20
it's this number that isn't refreshing because the whole page doesn't =
reload=20
when the user zooms in, just the map area...</FONT></SPAN></DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>#<BR># Start of Map File<BR>#</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff size=3D2>NAME=20
alaska<BR>STATUS ON<BR>SIZE 500 400<BR>EXTENT -2168806 410152 1491776=20
2378649<BR>SHAPEPATH /my_shape_path/<BR>IMAGECOLOR 135 206 =
235<BR>TRANSPARENT=20
off<BR>UNITS meters<BR>SYMBOLSET /my_symbol_path/<BR>FONTSET=20
/my_font_list/</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>PROJECTION<BR> "proj=3Daea"<BR> =
"units=3Dm"<BR> =20
"lat_1=3D55"<BR> "lat_2=3D65"<BR> "lat_0=3D50"<BR> =20
"lon_0=3D-154"<BR> "x_0=3D0"<BR> =
"y_0=3D0"<BR>END</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>WEB<BR> TEMPLATE "alaska.html"<BR> IMAGEPATH =
"/html/"=20
<BR> IMAGEURL "/tmp/"<BR>END</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>QUERYMAP<BR> COLOR 255 255 0<BR> STATUS =
on<BR> STYLE=20
hilite<BR>END</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>LEGEND<BR> IMAGECOLOR 255 255 255<BR> KEYSIZE 18=20
12<BR> LABEL<BR> TYPE =
TRUETYPE<BR> =20
FONT "tahoma"<BR> SIZE 8<BR> COLOR =
0 0=20
0<BR> END<BR> STATUS on<BR>END</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>SCALEBAR<BR> STYLE 0<BR> IMAGECOLOR 255 255 =
255<BR> =20
LABEL<BR> FONT "tahoma"<BR> COLOR =
0 0=20
0<BR> SIZE tiny<BR> BUFFER=20
3<BR> BACKGROUNDCOLOR 255 255 255<BR> =
END<BR> =20
SIZE 120 4<BR> COLOR 255 255 255<BR> BACKGROUNDCOLOR 0 0=20
0<BR> OUTLINECOLOR 0 0 0<BR> UNITS miles<BR> =
INTERVALS=20
4<BR> STATUS on<BR> TRANSPARENT =
true<BR>END</FONT></SPAN></DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>LAYERS...</FONT></SPAN></DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff size=3D2>END=20
#end mapfile</FONT></SPAN></DIV>
<DIV><SPAN class=3D536345217-10112003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr =
align=3Dleft><FONT=20
face=3DTahoma size=3D2>-----Original Message-----<BR><B>From:</B> =
Stephen Clark=20
[mailto:stephen.clark at focus.ca] <BR><B>Sent:</B> Monday, November =
10, 2003=20
1:34 PM<BR><B>To:</B> =
Amy.Stender at erdc.usace.army.mil<BR><B>Subject:</B> Re:=20
[Mapserver-users] dhtml refresh getscale() and =
latlong<BR><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>post your *.map file.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>You could also use the [scale] =
value returned=20
from the mapserver application in your getscale() =
function.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>stephen</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- =
</DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A title=3DAmy.Stender at erdc.usace.army.mil=20
=
href=3D"mailto:Amy.Stender at erdc.usace.army.mil">Amy.Stender at erdc.usace.ar=
my.mil</A>=20
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
title=3Dmapserver-users at lists.gis.umn.edu=20
=
href=3D"mailto:mapserver-users at lists.gis.umn.edu">mapserver-users at lists.g=
is.umn.edu</A>=20
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, November 10, =
2003 7:50=20
AM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Mapserver-users] =
dhtml=20
refresh getscale() and latlong</DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D482222615-10112003>Anyone know=20
how to refresh getscale() and window.status when the map is =
refreshed in=20
dhtml?</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D482222615-10112003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D482222615-10112003>At the bottom=20
of my map, I have the starting scale (1:20,000,000) but's not =
updated when=20
the user zooms in. It's static. Same thing with my lat/long. The =
initial=20
lat/long is correct, but it doesn't change after the user zooms=20
in.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D482222615-10112003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D482222615-10112003>Any help would=20
be greatly appreciated.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D482222615-10112003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D482222615-10112003>Thanks,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D482222615-10112003>Amy</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV align=3Dleft><SPAN=20
style=3D"FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: maroon; =
FONT-FAMILY: Tahoma">Amy=20
L. Stender</SPAN> <BR><FONT face=3DTahoma size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">Remote Sensing/GIS=20
Center</SPAN></FONT> <BR><FONT face=3DTahoma size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">Cold Regions =
Research and=20
Engineering Laboratory</SPAN></FONT> <BR><FONT face=3DTahoma =
size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">United States Army =
Corps of=20
Engineers</SPAN></FONT> <BR><FONT face=3DTahoma size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">72 Lyme Road, =
Hanover, NH=20
03755-1290</SPAN></FONT> <BR><FONT face=3DTahoma size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">Tel:<FONT =
color=3Dmaroon><SPAN=20
style=3D"COLOR: =
maroon">(603)646-4733 </SPAN></FONT></SPAN></FONT>=20
<FONT face=3DTahoma size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">Fax:<FONT =
color=3Dmaroon><SPAN=20
style=3D"COLOR: maroon">(603) 646-4730</SPAN></FONT></SPAN></FONT> =
<BR><FONT=20
face=3DTahoma color=3Dmaroon><SPAN=20
style=3D"COLOR: maroon; FONT-FAMILY: Tahoma"><A=20
href=3D"mailto:Amy.Stender at erdc.usace.army.mil"><FONT =
size=3D2><SPAN=20
style=3D"FONT-SIZE: =
10pt">Amy.Stender at erdc.usace.army.mil</SPAN></FONT></A></SPAN></FONT></DI=
V>
=
<DIV> </DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_00BD_01C3A77C.97A6F330--
More information about the MapServer-users
mailing list