[maplab-users] Problems adding a button at ROSA

joanvp joanvp at yahoo.com
Mon Jul 19 10:12:57 EDT 2004


Hi, 
I wanted to add buttons in ROSA applet. I read an
answer from Yifter Kidane Fikru:

" It seems to me that this is already discussed
before, but here is what how I managed to put, for
example adding the 'measure distance' button.
1. In the main_contents php, I added array_push(
$aszROSATools, "DIST" ) in the $aszROSATools array
list,
2. In the main.php file, I added
 
case "DIST":
     echo "<param name=\"TB_BUT_dist_IMG\" ".
      "value=\"./images/icon_dist_1.gif\">\n";
     echo "<param name=\"TB_BUT_dist_IMG_PR\" ".
      "value=\"./images/icon_dist_2.gif\">\n";
     echo "<param name=\"TB_BUT_dist_HINT\" ".
      "value=\"Measure Distance\">\n";
     echo "<param name=\"TB_BUT_dist_INPUT\" ".
      "value=\"dist\">\n";
     echo "<param name=\"TB_BUT_dist_NAME\" ".
      "value=\"ROSA_CMD\">\n";
     ECHO "<PARAM NAME=\"PIXEL_SIZE\" VALUE=\".05\">";
     echo "<PARAM NAME=\"TB_BUT_dist_CURSOR_TYPE\"
VALUE=\"CROSSHAIR\">";
     echo "<param name=\"TB_BUT_dist_VALUE\" ".
      "value=\"ruler\">\n";
     echo "<PARAM NAME=\"DIST_MSG\" ".
      "value=\"Approximative distance: %s Kms\">n";
 
in the 'foreach ( $aszRosaTools as $szTool )' section.
 
3. In the function checkSelected($szRosaCmd), I added
one case (main.php):
 
case "DIST":
  return "DIST";
  break;
 
I am sure there will be an updated ROSA so that we
would utilize more buttons.
 
I don't know if this helps you :-) "



So, I've tried it, but I haven't seen anything
different... I think the problem is when I open the
page with mapserver, the file main_contents.php is
updated, and the added line dissapear. Why???.
Something knows the solution or can explain me how it
works?

Thank you


		
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/



More information about the Maplab-users mailing list