[Mapserver-users] PHP/Mapscript - Point symbols appearing without color

Kasey Kirkham kasey at inexo.com
Wed May 5 12:59:39 PDT 2004


Hello all,

We are noticing a strange problem with pixmap symbol layers.  At certain
zoom levels the symbols will appear with the correct color.  At other
levels the color will disappear, leaving the symbol black for several
zoom levels, only to reappear upon zooming in a few levels further.  The
pixmaps are the standard colored dots that are packaged with Mapserver.

Here are the relevant bits: 

// MAPFILE

  LAYER
    NAME "point_mapping-green"
    TYPE POINT
    STATUS ON
    # CLASS object
    CLASS
      NAME "points_green"
      SYMBOL "gps_coordinate-green"
      COLOR 255 0 0
      # LABEL object
      LABEL
        POSITION CC
        SIZE TINY
        MINDISTANCE 400
        MINFEATURESIZE 5
        COLOR 255 255 255
        PARTIALS FALSE
      END
    END
  END

// SYMBOLSET file

Symbol
Name 'gps_coordinate-green'
Type PIXMAP
IMAGE "../markers/green8.png"
Transparent 4
END

// PHP Code

		foreach($point_array as $arPoints) {
			$pointObj_coord1 = ms_newPointObj();	// get a
point object

			// set the X and Y
			$coord_1_x = $arPoints["longitude"];
			$coord_1_y = $arPoints["latitude"];
			$pointObj_coord1->setXY($coord_1_x, $coord_1_y);


			// get_unit_symbol would return
'point_mapping-green', in this case
			$layerObj_imageSymbol =
$map->getLayerByName($currObjUnit->get_unit_symbol());

			// draw the point
			$pointObj_coord1->draw($map,
$layerObj_imageSymbol, $image, 0, ''); 
		}

Has anyone ever seen this type of behavior before?

Thanks for your help,
Kasey




More information about the MapServer-users mailing list