[maplab-users] Panning

William Bronsema wbronsema at dmsolutions.ca
Wed Oct 20 07:51:33 EDT 2004


Hi Isaac,

 

To add the capability to pan northeast/northwest etc. you need to edit
either your application.php & application_contents.php files (where
"application is the name of your application") or to make this a permanent
addition edit ./htdocs/gmapfactory/templates/app_php_file.php and
./htdocs/gmapfactory/build_phtml.php files and make changes similar to the
following:

 

1)       Edit the interface to include controls for the new directions.
This will be added to either the build_phtml.php file around line 574 or to
the application_contents.php file.

2)       Edit the processing files to handle the pan.  This will be done in
two steps:

i)                     Edit the app_php_file.php file around line 101 to
check the url for the new pan commands.  

 

i.e. 

if ( strlen( trim( $http_form_vars["Pan_NorthEast_x"] ) ) > 0 )

{

                  // check mode and set appropriate vars

                  if ( $http_form_vars['RosaMode'] == 1 )

                              $http_form_vars["INPUT_COORD"] = "0,0";

                  else

                              $http_form_vars[ "mainmap_x" ] = "0";

 

                  // set the command

                  $http_form_vars["ROSA_CMD"] = "PAN_NE";

}

 

ii)                   Edit the checkNavigation function to perform the pan
(around line 370)

 

i.e.        

case "PAN_NE":

            $oMapNavigator->pan( NORTH_EAST, 0.75 );

            return true;

            break;

 

Where NORTH_EAST is a constant (all other logical directions are also
supported) and 0.75 is the percentage of map width/height to move.

 

These changes can also be made directly to the application.php file.

 

 

HTH

 

Regards,

Bill

 

  _____  

From: maplab-users-bounces at lists.maptools.org
[mailto:maplab-users-bounces at lists.maptools.org] On Behalf Of ISAAC KWADWO
NTI
Sent: October 19, 2004 10:06 AM
To: maplab-users at lists.maptools.org
Subject: [maplab-users] Panning

 

Hello,

I am using maplab for my works and its very powerful and so good for my
liking. I have found out the the panning is only in the
north/east/south/west directions only. Is there a way of panning in any
direction( like the ones with the hand as icon) or if there is a way to pan
northwest/northeast/southwest/southeast.

I will really appreciate your help.



--

That which persist in doing becomes easier - not that the task has changed
but our ability to do it has increased.

Isaac Kwadwo Nti

Bei Wiafe Owusu-Banahene,

Zi C3, Adenauerring,

76131 Karlsruhe

Germany.

Home Tel: +4972162814743

Mobile    : +491798846336




  _____  

Express yourself instantly with MSN Messenger! MSN Messenger
<http://g.msn.com/8HMAEN/2734??PS=47575>  Download today it's FREE!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/maplab-users/attachments/20041020/778afd93/attachment.htm


More information about the Maplab-users mailing list