[maplab-users] Problems adding a button at ROSA

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

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
2. In the main.php file, I added
case "DIST":
     echo "<param name=\"TB_BUT_dist_IMG\" ".
     echo "<param name=\"TB_BUT_dist_IMG_PR\" ".
     echo "<param name=\"TB_BUT_dist_HINT\" ".
      "value=\"Measure Distance\">\n";
     echo "<param name=\"TB_BUT_dist_INPUT\" ".
     echo "<param name=\"TB_BUT_dist_NAME\" ".
     ECHO "<PARAM NAME=\"PIXEL_SIZE\" VALUE=\".05\">";
     echo "<PARAM NAME=\"TB_BUT_dist_CURSOR_TYPE\"
     echo "<param name=\"TB_BUT_dist_VALUE\" ".
     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";
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

Thank you

Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!

More information about the Maplab-users mailing list