I tried to use PictureMarkerSymbol for some customized points. However, no marker is displayed. The code for the PictureMarkerSymbol is below:
public var pointSym_Peolpe0:PictureMarkerSymbol = new PictureMarkerSymbol( "@Embed(source='com/esri/solutions/flexviewer/assets/images/icons/Icon2/People_0.png' )", 5, 5, 0, 0, 0);
The path is right. Is anything incorrect? Thanks for your reviewing and providing your hint.
Well it sounds like your XY is okay.. I am not using the ESRI Flex Viewer so I can not confirm your path, but usually Flex Builder will yell at you if your Embedded path is incorrect.. Do you see any warnings or get a Build error ?
Here are a few things I would try...
- Confirm the path. - Test it without embedding the image - Make sure the width and height of the image are as you defined in the constructor... - Find a sample in the ESRI Flex Viewer source code and use that to confirm it works..
Drew: No warning is received for the path. I tested without embedding image using a SimpleMarkerSymbol and it works well. I will test again. Thanks for your time. Shaning
Try embedding the image outside of the constructor.. I know it maybe a silly thing to try, but it�??s worth a shot.. Here is some sample of the code�?�.
[Bindable]
[@Embed(source='../assets/images/myImage.png')]
private var myImage:Class;
private function XYZ():void
{
var pictureMarker:PictureMarkerSymbol = new PictureMarkerSymbol(myImage,16,16);
..
..
..
}