panning and zoomin and out, and ect
Albert Anderson
bart_doggers at YAHOO.COM
Wed Aug 2 09:17:36 PDT 2006
Hi,
Okay. I downloaded it but where do I untar it. I am using GIShost Mapserver 4 on a linux machine. Do I put it under var/www/htdosc/dBox???? or what?
Albert
"Fawcett, David" <David.Fawcett at state.mn.us> wrote:Message Albert,
I am referring to dBox, not jBox.
dBox uses dhtml (javascript), not Java.
David.
-----Original Message-----
From: Albert Anderson [mailto:bart_doggers at yahoo.com]
Sent: Wednesday, August 02, 2006 11:08 AM
To: Fawcett, David; MAPSERVER-USERS at lists.umn.edu
Subject: Re: [UMN_MAPSERVER-USERS] panning and zoomin and out, and ect
Hi,
I tried that yestarday. I couldnt seem to get jBox working. I made the java/jBox folder under my var/www/htdocs. After that I tried everything but I got confussed.
Albert
"Fawcett, David" <David.Fawcett at STATE.MN.US> wrote: Albert,
You may want to look at how it is done in the dBox interface.
http://maps.dnr.state.mn.us/tools/dbox/
In fact, you may just want to use dBox or modify it.
David.
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Albert Anderson
Sent: Wednesday, August 02, 2006 10:50 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] panning and zoomin and out, and ect
Hi,
Its not working cause It doesnt do anything when I click the button. I got know if I want my number to go negative. I am new to this. You told me to try this i would try
if(direction=='nw'){
x = 1;
y = 1;
}
so do I change my code that I have? else if(direction== 'nw') {
x = 0 + (309 * pansize)/2.0;
y = 0 + (309 * pansize)/2.0;
I dont know what I am doing?Could you help me?
Thanks,
Albert
Brent Pedersen <bpederse at nature.Berkeley.EDU> wrote: hi, can you give more info on how it is not working?
what happens?
you may want to check what x and y are coming out as.
often + will concatenate numbers instaed of adding.
also, are you sure you want x and y to go negative as you
have made them in 'nw' for example?
i would try
if(direction=='nw'){
x = 1;
y = 1;
}
which i think should recenter you on the upper left corner of the map.
On Wed, 2 Aug 2006, Albert Anderson wrote:
> Hi,
> I put my code with this email "hoping" for more than just it maybe in your map file or hidden variables thats all.
>
> Thanks,
> Albert
>
> Luis Treviño wrote: Albert:
> Maybe the problem is in your map file or in the hidden variables of your template.
>
>
>
> 2006/8/1, Albert Anderson : Hi,
>
> I tried that code. I didnt get it to work. Here is my code. Can you see if I need to do something else? What else do I need?
>
>
>
>
> var mapheight = 417;
> var mapwidth = 309;
> var pansize = 0.75;
>
> function pan(direction) {
> var x,y;
>
> if(direction== 'n') {
> x = (309-1)/2.0;
> y = 0 - (417 * pansize)/2.0;
> } else if(direction== 'nw') {
> x = 0 - (309 * pansize)/2.0;
> y = 0 - (309 * pansize)/2.0;
> } else if(direction== 'ne') {
> x = (309-1) + (309 * pansize)/2.0;
> y = 0 - (417 * pansize)/2.0;
> } else if(direction== 's') {
> x = (309-1)/2.0;
> y = (417-1) + (417 * pansize)/2.0;
> } else if(direction== 'sw') {
> x = 0 - (309 * pansize)/2.0;
> y = (417-1) + (417 * pansize)/2.0;
> } else if(direction== 'se') {
> x = (309-1) + (309 * pansize)/2.0;
> y = (417-1) + (417 * pansize)/2.0;
> } else if(direction== 'e') {
> x = (309-1) + (309 * pansize)/2.0;
> y = (417-1)/2.0;
> } else if(direction== 'w') {
> x = 0 - (309 * pansize)/2.0;
> y = (417-1)/2.0;
> }
>
> document.mapserv.imgxy.value = x + " " + y;
> document.mapserv.submit();
> }
>
>
>
>
> HEIGHT="460" BORDER="0" align="left" CELLPADDING="0" CELLSPACING="0">
>
>
>
>
> VALIGN="top" BGCOLOR="#e7a500">
>
> VALIGN="top">
>
> VALIGN="top" BGCOLOR="#e7a500">
>
>
>
>
> VALIGN="MIDDLE">
>
> HEIGHT="413" VALIGN="MIDDLE" WIDTH="309">
>
>
> [input]
>
> VALIGN="MIDDLE">
>
>
>
> VALIGN="bottom" BGCOLOR="#e7a500">
>
> VALIGN="bottom">
>
> VALIGN="bottom">
>
>
>
>
> Luis Treviño wrote:
>
> 2006/7/21, Albert Anderson : Hi,
>
> I figure out my images. Does anyone have a _java script for using a image for panning. I have images set for the corners of my map. I want to use them to pan.
>
> You can use something like this, you have to handle your width and height of your image:
> alto = height, ancho = width.
> function paneo(direccion,alto,ancho) {
> var x,y;
> var pansize = 0.75;
> if(direccion == 'n') {
> x = (ancho-1)/2.0;
> y = 0 - (alto * pansize)/2.0;
> } else if(direccion == 'nw') {
> x = 0 - (ancho * pansize)/2.0;
> y = 0 - (ancho * pansize)/2.0;
> } else if(direccion == 'ne') {
> x = (ancho-1) + (ancho * pansize)/2.0;
> y = 0 - (alto * pansize)/2.0;
> } else if(direccion == 's') {
> x = (ancho-1)/2.0;
> y = (alto-1) + (alto * pansize)/2.0;
> } else if(direccion == 'sw') {
> x = 0 - (ancho * pansize)/2.0;
> y = (alto-1) + (alto * pansize)/2.0;
> } else if(direccion == 'se') {
> x = (ancho-1) + (ancho * pansize)/2.0;
> y = (alto-1) + (alto * pansize)/2.0;
> } else if(direccion == 'e') {
> x = (ancho-1) + (ancho * pansize)/2.0;
> y = (alto-1)/2.0;
> } else if(direccion == 'w') {
> x = 0 - (ancho * pansize)/2.0;
> y = (alto-1)/2.0;
> }
> document.mapserv.imgxy.value = x + " " + y;
> document.mapserv.submit();
> }
>
>
> Anyother question, is there a _java script for images to zoom-in and out?
> you can use the zoomdir and the zoom values within your template, like:
> [input]
> [input]
> for a zoom out., so you can use radio buttons to manage this values
>
>
>
> One more question, I have a refresh button and pan radio button, then we I click refresh to take a layer off it moves the projective image. Why? But when I am on zoomin radio button and click refresh it acts like its panning? Why?
>
> Thanks,
>
> Albert
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
>
> Hope this helps.
>
> Regards,
> Luis
>
>
>
>
>
>
> ---------------------------------
> Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
>
>
>
>
>
>
>
> ---------------------------------
> Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
---------------------------------
Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups.
---------------------------------
Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups.
---------------------------------
Do you Yahoo!?
Get on board. You're invited to try the new Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060802/6c97d729/attachment.htm>
More information about the MapServer-users
mailing list