[maplab-users] links from map to jpg

Steffen Macke sdteffen at web.de
Wed Sep 1 15:42:24 EDT 2004


Kevin,

> I changed the code, but the link still does not work.

Are you getting any error messages? Please check that you've switched
on as many error and warning messages in php.ini as possible.

My code snippet had a small problem (I used or instead of ||)
Could you check the snippet below.

If it's not working and you don't get any error messages, please add some 
debug code E.g. 
echo($key);
echo($xCell);

and post the results to the list.

Steffen

// loop and add a cell for each result
foreach ( $aRow as $key => $xCell ) {
  // $xCell is the attribute value, in this case,when the $key attribute name  
  // is equal to "Long_DD" and "Lat_DD" only display the value of attribute.
  if((strcasecmp($key, "Long_DD") == 0) ||
     (strcasecmp($key, "Lat_DD") == 0 )) {
     $szReturnValue .= "<td bgcolor=\"#ffffff\">".
       "<font face=\"Arial, Helvetica, sans-serif\" size=\"2\">".     
       $xCell."</font></td>\n";
  }

  // when the attribute name is equal to MS_PATH2, hyperlink according to the 
  // value of attribute, the attribute value of MS_PATH2 should be simliar as  
  // http://localhost/photoalbum/image.jpg  
  //photoalbum folder with images is put at your web server.
  
  else if(strcasecmp($key, "MS_PATH2") == 0) {
    $szReturnValue .= "<td bgcolor=\"#ffffff\"> <a href=\"".$xCell.
      "\"> Click here to document</a></td>\n";
  }          
}



More information about the Maplab-users mailing list