[maplab-users] Creating new graphic adding my own php script

Hisaji Ono
Wed, 12 Mar 2003 05:40:50 +0900

 I've tried to display geometries by MapLab generated scripts adding my own

 In following way, I've added my scripts in test(Map Name).php.

function drawMainMap( $urlMainMap, $nRosa, $szCommand, $oSession,
                      $PrevStateKey, $aszRosaTools )
    // get the current map object
    $oMap = $oSession->getMapObj();

    // get the selected toolbar button
    $szButton = checkSelected($szCommand);

    include_once( "./drawline.php" ); <--- added for including my own script

    // draw the the map as an applet of ROSA is on
    if ( $nRosa == 1 || !isset( $nRosa ) )

 And my script is as follows.

  $layer = ms_newLayerObj($oMapSession->oMap);
  $layer->name = "linexxx";
  $shp = ms_newShapeObj(MS_SHAPE_LINE);

  $extent = $oMapSession->oMap->extent;

  $line = ms_newLineObj();

  $p = ms_newPointObj();



  $poClass = ms_newClassObj($oMapSession->oMap->getLayer(4));

 After issued this script, But I've got no geometries.

 Could you tell me why graphics not display?

 Best Regards.

This archive was generated by Pipermail.