user defined point doesn't work

Feb 2, 2011 at 9:39 AM

Hi all,

i want to use an image over the point in my shapefile; i follow the instructions in the reference manual (page 29), but my application crashes...

i'm using vs2008 (c++ project) and i haven't the latest ocx (4.8 in my toolbox, 4.7sra installer)

anybody can help me??

thanks a lot!

seum

Developer
Feb 3, 2011 at 8:30 PM

Seum,

could you post your code? What is the  version of MapWinGIS you are using?

Thanks,

Sergei

Feb 4, 2011 at 8:22 AM

HI,

this is the portion of code i'm using:

////
//MapWinGIS::Image^ img = gcnew MapWinGIS::ImageClass();
//MapWinGIS::ICallback^ myCb;
//bool result = img->Open("C:\\temp\\image.gif",MapWinGIS::ImageType::USE_FILE_EXTENSION,true,myCb);
//this->axMap1->set_ShapeLayerPointSize(layerHndl, 1);
//this->axMap1->set_ShapeLayerPointType(layerHndl, MapWinGIS::tkPointType::ptUserDefined);
//this->axMap1->set_UDPointType(layerHndl,img);
////

 

where layerHndl is:

//int layerHndl = this->axMap1->AddLayer(this->platformShpFile, true);

 

the version i'm using is 4.7

I hope to have answers soon!!

Thanks!!

 

Developer
Feb 4, 2011 at 8:52 AM

The quick answer: try to use bmp images. It worked for me.

There were not crashes for other types, but they weren't drawn. I'll make them work but a bit later.

The other thing: have you created the instance of the callback? I don't see it in the code.

Regards,

Sergei

 

Feb 4, 2011 at 11:40 AM

1 - I will convert the image in bmp

2 - The instance myCb is created some line above (//MapWinGIS::ICallback^ myCb;). may I do some other thing?

Developer
Feb 4, 2011 at 11:52 PM

The code below has worked for me (C#). In case you still have problems - update to the latest version.

Also my recommendation would be to use ShapeDrawingOptions.Picture property to do the job (new symbology). 

private void button8_Click(object sender, EventArgs e)
{
    axMap1.ShapeDrawingMethod = tkShapeDrawingMethod.dmStandard;
    OpenFileDialog dlg = new OpenFileDialog();
    MapWinGIS.Shapefile sf = new MapWinGIS.Shapefile();
    dlg.Filter = sf.CdlgFilter;
    if (dlg.ShowDialog() == DialogResult.OK)
    {
        sf = new MapWinGIS.Shapefile();
        if (sf.Open(dlg.FileName, null))
        {
            int handle = axMap1.AddLayer(sf, true);
            MapWinGIS.Image img = new MapWinGIS.Image();
            if (img.Open("C:\\icon.bmp", ImageType.USE_FILE_EXTENSION, true, null))
            {
                this.axMap1.set_ShapeLayerPointSize(handle, 1);
                this.axMap1.set_ShapeLayerPointType(handle, MapWinGIS.tkPointType.ptUserDefined);
                this.axMap1.set_UDPointType(handle, img);
            }
            axMap1.Redraw();
        }
    }
}

Feb 7, 2011 at 11:49 AM

Thanks!

Now it works!

I've only add the Redraw() function and i see my image!

Now, my image is too larger...is it possible to reduce it, or i have to change the original one?

Thanks all!

Feb 7, 2011 at 12:09 PM

I have other questions:

- is there  a way to rotate this user defined point of a certain degree?

- the user defined point is linked to a particular shape(infact, one parameter is the handle of the shape), so i can have, in a shapefile, a certain number of points, each with a different image. Is it true?

Developer
Feb 8, 2011 at 12:23 AM

I  would suggest to use ShapeDrawingOptions class (Shapefile.DefaultDrawingOptions) then it will be possible to scale and rotate the bitmap.

But setting different images it's possible for the method you are using as well.

 

Feb 8, 2011 at 1:45 PM

Can you give us an example on how to use ShapeDrawingOption class?

There isn't enough documentation, imho, to understand how to use it.

It will be great!And i thank you in advance...:)

Developer
Feb 8, 2011 at 3:25 PM

I haven't got time for the real example. But in short it should be something like this (C#).

ShapeDrawingOptions options = Shapefile.DefaultDrawingOptions;

Image img = new img();

img.Open(...);

options.Picture = img;

options.PictureScaleX = 2.0; // any other coefficient

options.PictureScaleY = 2.0;

options.PictureRotation = 45.0;

In case different pictures are needed:

ShapefileCategory category = Shapefile.Categories.Add("Name");

ShapeDrawingOptions options = category.DrawingOptions;   // code for setting options like above

To apply categories to shapes:

Shapefile.ShapeCategory(long ShapeIndex) = index;   // index of category you added previously, 0 for the first one

Hope this'll help,

Sergei

Feb 9, 2011 at 8:34 AM

thanks sergei,

but i need to do this

this.axMap1.set_ShapeLayerPointSize(handle, 1);
this.axMap1.set_ShapeLayerPointType(handle, MapWinGIS.tkPointType.ptUserDefined);
this.axMap1.set_UDPointType(handle, img);


right?
Developer
Feb 9, 2011 at 9:26 AM

I guess no. These 2 are different approaches. The one you are using is old. The new one has better functionality.

I forgot to mention it's necessary to set point type:

options.PointType = ptSymbolPicture;

You need one of the latest releases (4.8) to use it of course.

 

Feb 9, 2011 at 9:30 AM

Ok...

so i must resolve before my problem of updating ocx in the other post ...if you can have a look it will be good !!!

Feb 9, 2011 at 12:27 PM

this is my code:

MapWinGIS::ShapeDrawingOptions^ opt = gcnew MapWinGIS::ShapeDrawingOptionsClass();
     opt = this->platformShpFile->DefaultDrawingOptions;
MapWinGIS::Image^ img = gcnew MapWinGIS::ImageClass();
MapWinGIS::ICallback^ myCb;
bool result = img->Open("C:\\temp\\image.gif",MapWinGIS::ImageType::USE_FILE_EXTENSION,true,myCb);
    opt->Picture = img;
    opt->PictureScaleX = 2.0;
    opt->PictureScaleY = 2.0;
    opt->Rotation = 45.0;
    opt->PointType = MapWinGIS::tkPointSymbolType::ptSymbolPicture;

 

i see a little square in the point position (it seems only one pixel...)

i've tried to change the pictureScaleX/Y options but...nothing...

Any suggestion?

Feb 9, 2011 at 12:37 PM

Now i have the same result with the old style udpoint...i see a little square point on map...maybe some problem with ocx updating????

Developer
Feb 9, 2011 at 3:05 PM

Seum, 

the following code worked for me.

        private void button1_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();
            MapWinGIS.Shapefile sf = new MapWinGIS.Shapefile();
            dlg.Filter = sf.CdlgFilter;
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                sf.Open(dlg.FileName, null);
                axMap1.AddLayer(sf, true);

                MapWinGIS.Image img = new MapWinGIS.Image();
                img.Open("f:\\icon.bmp", ImageType.USE_FILE_EXTENSION, true, null);

                ShapeDrawingOptions options = sf.DefaultDrawingOptions;
                options.PointType = tkPointSymbolType.ptSymbolPicture;
                options.Picture = img;
                options.PictureScaleX = 2.0;
                options.PictureScaleY = 2.0;
                options.PictureRotation = 45.0;

                axMap1.Redraw();
            }
        }

Feb 9, 2011 at 3:34 PM

Nothing, i see a little square black shape...it seems to be the default shape point type (square, size 1)...

i've tried with a bitmap and with different scaling...same thing.

What have i do to resolve the problem?

Feb 10, 2011 at 1:46 PM

I've tried to create a new MapWinGIS project. I've created a form with the map control and a button. Then, i have copied your code in my project...i have the same little square black shape!!!

What is happening here???

(Notice that, before the updating of ocx, the old style mode to use an image on a shape point works!!!)

May I have to downgrade to ocx 4.7 with a new installation of activeX?

Please, i need help!I'm going crazy!!!

Developer
Feb 11, 2011 at 2:44 AM

Seum,

I've just unregistered my current version of MapWinGis, downloaded the latest binaries (16 of January)  and tested the code. It works, icons show all right. It seems some misunderstanding is taking place indeed ;)

So, in case there are troubles I'd recommend you to use the 4.7 stable version for some time. At least before we provide documentation and sample code for the new version. 

Regards,

Sergei

Feb 11, 2011 at 8:48 AM

Ok, now i have downgraded the ocx to 4.7 and i see the image!

Now, there is a way to rotate the point shape?

Feb 14, 2011 at 1:56 PM

Sorry for repetitions, but i need to know if there is a possibility to rotate a point shape using 4.7 version...

Thanks.

Feb 14, 2011 at 2:42 PM

Sergei,

i've noticed that, after the downgrade to 4.7 version, when i load my vc++ project i see this error in forms in which i've used the map ocx control:

unknown type AxMapWinGIS.AxMap

in other form with no map control, in the toolbox i see the map component...if i add a map into this form and rebuild all, i see the old map controls in other forms, but if i close and reopen the project, the problem is the same described above---

i've tried to uninstall and reinstall the component but it's not a solution-...

please help!What can i do now?

Thanks

Feb 14, 2011 at 2:51 PM

I've tried to create a brand new project and add a map component;

i've build the project: all works well.

If i close and restart the project, i see the map component: all works...

MAybe i have problems in my project?how can i resolve it?I need help soon...i hope someone can help me

Developer
Feb 14, 2011 at 6:21 PM

Seum,

rotation of point symbols is available only using the code I posted above - MapWinGIS 4.8 is needed.

As for the project problems, watch carefully the references and interop dlls. I've told about the steps to update interops already.

Regards,

Sergei

 

Feb 21, 2011 at 2:45 AM
Edited Feb 21, 2011 at 2:44 PM

 I tried to collect all the code from all posts, but couldn't get this code working. Am I doing something wrong?

this is my code, when I perform it I see white screen only:

 

axMap1.ShapeDrawingMethod = tkShapeDrawingMethod.dmNewSymbology;
            MapWinGIS.Shapefile sf = new MapWinGIS.Shapefile();
            ofd.Filter = sf.CdlgFilter;
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                sf = new MapWinGIS.Shapefile();
                if (sf.Open(ofd.FileName, null))
                {
                    if (sf.ShapefileType != ShpfileType.SHP_POINT)
                    {
                        MessageBox.Show("Point shapefile is expected. Exiting...");
                        return;
                    }
                    //sf.FastMode = true;
                    MapWinGIS.Image img = new MapWinGIS.Image();
                    string  file = @"C:\\TestData\\s.bmp");
                    int handle = axMap1.AddLayer(sf, true);
                    if (File.Exists(file))
                    {
                        if (img.Open(file, ImageType.USE_FILE_EXTENSION, true, null))
                        {
                            ShapeDrawingOptions options = sf.DefaultDrawingOptions;
                            options.PointType = tkPointSymbolType.ptSymbolPicture;
                            options.Picture = img;

                            ShapefileCategory category = sf.Categories.Add("Name");
                            ShapeDrawingOptions optioncat1 = category.DrawingOptions;
                            optioncat1.PointType = tkPointSymbolType.ptSymbolPicture;
                            optioncat1.Picture = img;

                            int n = sf.NumShapes;
                            for (int i = 0; i < n; i++)
                            {
                                sf.set_ShapeCategory(i, 0);   // index of category you added previously, 0 for the first one
                            }

                            //options.PictureScaleX = 2.0;
                            //options.PictureScaleY = 2.0;
                            //options.PictureRotation = 45.0;
                            //old implementation (not in using anymore)
                            //this.axMap1.set_ShapeLayerPointSize(handle, 1);
                            //this.axMap1.set_ShapeLayerPointType(handle, MapWinGIS.tkPointType.ptUserDefined);
                            //this.axMap1.set_UDPointType(handle, img);
                        }
                    }

                    axMap1.Redraw();
                 }
            }
Developer
Feb 23, 2011 at 4:17 PM

Igor,

there were some problems with icons indeed:

1. For GDAL based images (.png, .tif, etc), buffer hadn't been loaded automatically. Is fixed now.

2. For .bmp images TransparencyColor2 wasn't set correctly (always black), therefore image could become invisible (the TransparencyColor is set to white and UseTransparency set to true).

I fixed this as well. Transparent color for bmp is taken from upper left corner of the image now and UseTransparency is set to true by default.

3. When opening .bmp icons inRam parameter should be set to true. Otherwise the data won't be loaded.

4. MapWinGis currently doesn't support bmp with 32bit per pixel color depth (inRam mode). Such icons should be converted to 24 bpp.

I'll commit the code soon.

Thanks for pointing out this issue,

Sergei

Feb 24, 2011 at 2:46 AM

Sergei,

thank you for the support. will be waiting next version.

Igor.

Mar 23, 2011 at 10:23 AM

Hi,

now that i've resolved my problems with ocx, i want to know how this code doesn't work:

MapWinGIS::ShapeDrawingOptions^ opt = ShpFile->DefaultDrawingOptions;
        opt->PointType = MapWinGIS::tkPointSymbolType::ptSymbolPicture;
        MapWinGIS::Image^ ptfImage = gcnew MapWinGIS::ImageClass();
        ptfImage->Open("image.gif", MapWinGIS::ImageType::USE_FILE_EXTENSION, true, nullptr);
        opt->Picture = ptfImage;
        opt->PictureScaleX = 2000.0;
        opt->PictureScaleY = 2000.0;
        this->map->Redraw();

 

i see the little black square that i've described in previous posts...please i need to have images in this way to perform rotation!

 

thanks all

Developer
Mar 27, 2011 at 12:37 PM

Seum,

1. PictureScaleX and PictureScaleY properties change the size of your icon. For example if you had an icon of 16*16 size, by setting 2000.0 scaling you will receive the icon with size 32000*32000 pixels!

So the first thing to do is to set more realistic values. 

2. I fixed a couple of issues with the icons as described above. But the fixes will be available in the latests binaries only (Other Available Downloads - 03 of March).

In case you are using older binaries (recommended download), try to add these lines after opening the picture:

Image.LoadBuffer;   // 10 for buffer size

Image.UseTransparency = false;

Mar 28, 2011 at 8:48 AM

Sleschinski,

that's my code now:

MapWinGIS::ShapeDrawingOptions^ opt =  this->platformShpFile->DefaultDrawingOptions;
        opt->PointType = MapWinGIS::tkPointSymbolType::ptSymbolPicture;
        MapWinGIS::Image^ ptfImage = gcnew MapWinGIS::ImageClass();
        ptfImage->Open("image.bmp", MapWinGIS::ImageType::USE_FILE_EXTENSION, true, nullptr);
        ptfImage->UseTransparencyColor = false;
        ptfImage->BufferSize = 10;
        ptfImage->XllCenter = position.getLongitude(DEG);
        ptfImage->YllCenter = position.getLatitude(DEG);
        opt->Picture = ptfImage;
        opt->PictureScaleX = 2.0;
        opt->PictureScaleY = 2.0;

 

i haven't found the LoadBuffer, but only Buffersize for the image...i'm on VC++...

i have downloaded the 3March version, and now i don't see anything

if i use the original code (the one with the point circle) it doesn't work too...

what is happening now???

Mar 28, 2011 at 9:22 AM

i update my latest post:

i have discovered that, if i perform another shape drawing on the map (using code above), i see the image on it!!!

now, i have this problems:

1- in my first image addition on the map, i see only the label and not the image; in next addings, i see the images, but not the labels...is there a changing in label managing?how can i add a label under my image with last ocx?

2- if i perform the shape movement with drag&drop with previous version, it works; now it doesn't! So, how can i change the position of the image in new ocx version?

Mar 28, 2011 at 9:29 AM

i think that there is not a link between the shape and the image...the link is only between the shapefile and the image...but i want that each shape has its own image, and i want to move it regardless from others..is it now possible?

Mar 28, 2011 at 10:34 AM

it will be good to know how to use the older code version with new ocx...maybe it is needed some definition of point symbol??

thanks!

Developer
Mar 28, 2011 at 11:28 AM

<<<but i want that each shape has its own image<<<

To set different images for shapes you should use categories. I suppose there are some examples how to do it in other threads.

<<<in my first image addition on the map, i see only the label and not the image; in next addings, i see the images, but not the labels<<<

Most likely you see a collision avoidance code is working, due to it labels can't overlap with images and points symbols. Try to set Labels.OffsetX, Labels.OffsetY properties.

Also try Labels.AutoOffsetMode property. In the next binaries Shapefile.CollisionMode property will be available to set turn on/off this behavior.

<<< if i perform the shape movement with drag&drop with previous version, it works; now it doesn't!<<<

Can't say about it without seeing the actual code for dragging.

<<<it will be good to know how to use the older code version with new ocx...maybe it is needed some definition of point symbol??<<<

To toggle between old/new symbology, there Map.ShapeDrawingMode property. 

Mar 28, 2011 at 11:55 AM
Edited Mar 28, 2011 at 1:37 PM

 

 

Mar 28, 2011 at 12:21 PM
Edited Mar 28, 2011 at 1:39 PM

;


Mar 28, 2011 at 12:33 PM
Edited Mar 28, 2011 at 1:39 PM

;

Mar 28, 2011 at 1:17 PM
Edited Mar 28, 2011 at 1:39 PM

;

Mar 28, 2011 at 1:18 PM
Edited Mar 28, 2011 at 1:39 PM

<<<<<< if i perform the shape movement with drag&drop with previous version, it works; now it doesn't!<<<

<<<Can't say about it without seeing the actual code for dragging.

when i want to perform a drag&drop of a shape, i simply set the new value of the shape, changing shapefile->shape[shapeIndex]->point[pointIndex]->x and shapefile->shape[shapeIndex]->point[pointIndex]->y  properties;

 

 

<<<<<<in my first image addition on the map, i see only the label and not the image; in next addings, i see the images, but not the labels<<<

<<<Most likely you see a collision avoidance code is working, due to it labels can't overlap with images and points symbols. Try to set Labels.OffsetX, Labels.OffsetY properties.

       Also try Labels.AutoOffsetMode property. In the next binaries Shapefile.CollisionMode property will be available to set turn on/off this behavior.

that's my code:

this->platformShpFile->Labels->AddLabel(shp->Key, shp->Extents->xMin, shp->Extents->yMax, 0, 0);
        this->platformShpFile->Labels->AutoOffset = true;
        this->platformShpFile->Labels->AvoidCollisions = true;

 

same behavior...i see the first label, when i perform a new adding, i don't see labels

the last parameter of AddLabel is int Category...what is it?

is it possible to have some simple code to do a shape addition with image and labels?

 

<<<<<<it will be good to know how to use the older code version with new ocx...maybe it is needed some definition of point symbol??<<<

<<<To toggle between old/new symbology, there Map.ShapeDrawingMode property.

 

i set the shapedrawingmode to dmStandard but i have some problems:

labels is positioned in the left of point shapes and if i change its position, nothing happens...need help!

 

regarding the use of dmStandard symbology, after adding some map->redraw() now i can perform the change of position of shapes (represented by points); remains a label problem, infact, after position changing of one point, labels of other points disappears...

with dmStandard symbology, i see also the first point shape added (with new symbology, i don't see first one added);

i also noticed that, with dmStandard symbology with new ocx, the map->set_LayerLabelsOffset() adjust the label horizontally (and not vertically as done in old ocx version...)

 

p.s. i'm sorry for previous null posts...i cannot delete them...can you do it for me?

Apr 6, 2011 at 9:00 AM
Edited Apr 6, 2011 at 9:03 AM

any replication about my issue?

maybe, something is changed from older version, and older functions in new ocx doesn't work as in older style...can you control it?

i need to use the image rotation in my application, so please help me!

thanks

May 4, 2011 at 12:26 PM

please, help me with this issue!

thanks a lot!

Jun 2, 2011 at 10:13 PM

I'm attempting to use a user defined point (symbol), and apply a rotation to the point, but keep receiving a message "Invalid Parameter Value" when I check the last error code/message.

I'm able to change the PictureScaleX and PictureScaleY values, but the call to make a rotation change never works.

I've added a sample of a sample rotate method (using MFC on Visual Studio 2008 Professional) and MapWinGIS v4.8.2 (April 2011).

The rotation appears to NOT work, or at least, not work properly with my code.  I'm experiencing other issues as well.  There are issues with trying to use a PNG or JPG file and using the transparency flags/values. 

In the code below, when I comment JUST the "put_PointRotation", I no longer receive the "Invalid Parameter Value" error message.  I haven't looked at the MapWinGIS code... haven't had the time to do so.

void CMapDlg::Rotate(double dRotateAngle, int layer)
{
    long lErrorCode;
    CString sErrorMsg;
    BSTR bstErrorMsg;
    HRESULT hr;

    //Get the Shapefile object
    MapWinGIS::IShapefilePtr pShapefile = m_Map.get_GetObject(layer);
    //Setup a pointer for the drawing options
    MapWinGIS::IShapeDrawingOptionsPtr pOptions;
    //Now set the pointer to the shapefile's drawing options
    hr = pShapefile->get_DefaultDrawingOptions(&pOptions);
    //-- I've checked the hr value (S_OK)... I could put an if to check
    //Attempt to make rotation of 1 degree
    hr = pOptions->put_PointRotation(1.0f); //This does not rotate the picture...

    if (FAILED(hr))
         AfxMessageBox(TEXT("Error"));
    //Check for an error code - even though hr == S_OK
    hr = pOptions->get_LastErrorCode(&lErrorCode);
    if (lErrorCode != 0)
    {
        //Convert the error code to the message
        hr = pOptions->get_ErrorMsg(lErrorCode, &bstErrorMsg);
        //Display the error message in a message box
        AfxMessageBox(bstErrorMsg);
    }
}
        
        
        
    

    
Jun 3, 2011 at 3:20 PM
Edited Jun 3, 2011 at 7:33 PM

Is there anyone that currently does have rotation working for user defined points (using the ShapeDrawingOptions)?  I have noticed other options, such as creating a user defined point list and loading a bunch of images in, but that just does not seem as elegant...  But, if that's the ONLY option, I believe going back to MapWinGIS v 4.7.5 will be a better option, as there are still small problems in v 4.8.2 that I'm experiencing.

What should the parameter for the "put_PointRotation( ... )" be?  Is it a standard angle (0 to 360) or is it in radians (based on Pi)?  I'm not sure where the documentation is on this...

After inspect of the code (in ShapeDrawingOptions), I discovered that the range should probably be -360 to +360 (I'm assuming degrees, based on tests).

The current issue is that the check in the "put_PointRotation" to validate the value only accepts values smaller than -360 and greater than 360... I believe there is a small issue and have added an entry in the issue tracker.

Has anyone experienced any problems with the point rotation transparency values?

Sep 14, 2011 at 6:35 PM

I'm experincing the problems with the transparency, I rotated the icon that i have so I have 360 images, I load then all, but only the ones that are multiple of 90 are shown. If I use a jpg image, all the angles are displayed but witouth the transparent background.

Oct 29, 2011 at 11:48 AM

Hello

Is there any way to use png images instead of bmp images for displaying user defined points in my shapefile ?

Only  bmp images with 256 color is working which is not sharp enough. Please help if anybody Succeed in using png images. I am using VS10,C# 

Jineesh

 

 

Nov 8, 2011 at 1:30 PM
Edited Jan 20, 2012 at 12:18 AM

jineesh,

Just change the filename to your desired .png, it should work. Use the same method as if you use bmp image.

 

Dim Img As New MapWinGIS.Image
Img.Open("D:\YourImage.png", MapWinGIS.ImageType.USE_FILE_EXTENSION, True)
ShpFile.DefaultDrawingOptions.PointType = MapWinGIS.tkPointSymbolType.ptSymbolPicture
ShpFile.DefaultDrawingOptions.Picture = Img


I still can't get the transparency to work :(

and not sure what is the difference if i use ImageType.USE_PNG_FILE

 

Edit: Transparency works in v4.8 final

Jan 12, 2012 at 2:24 AM
Edited Jan 12, 2012 at 2:24 AM
jineesh wrote:

Hello

Is there any way to use png images instead of bmp images for displaying user defined points in my shapefile ?

Only  bmp images with 256 color is working which is not sharp enough. Please help if anybody Succeed in using png images. I am using VS10,C# 

Jineesh

 

 


Hi, jineesh :

I have meet the same problem as you ,  is there some method?

liaosl88

Mar 24, 2012 at 12:11 PM

Hi everyone:

     I want to  add  a special bitmap to a special point in point shape file, and i try to work in C#. 

    my code:

   

    MapWinGIS.Image[] ico = new MapWinGIS.Image[3];
            for (int i = 0; i < 3; i++)
            {
                ico[i] = new MapWinGIS.Image();
            }

            ico[0].Open(@"C:\move.bmp", MapWinGIS.ImageType.USE_FILE_EXTENSION);
            ico[1].Open(@"C:\photo.bmp", MapWinGIS.ImageType.USE_FILE_EXTENSION);
            ico[2].Open(@"C:\Bulbon.bmp", MapWinGIS.ImageType.USE_FILE_EXTENSION);
 
           Shapefile PointShpFile = this.axMap1.get_Shapefile(PointLayer);
            PointShpFile.StartEditingShapes(true);

            MapWinGIS.Shape PointShape = new Shape();
            int[] indextype = new int[3];

            for (int i = 0; i < 3; i++)
            {
                indextype[i]=axMap1.set_UDPointImageListAdd(PointLayer, ico[i]);
            }

            for (int i = 0; i < PointShpFile.NumShapes; i++)
                {       

                        axMap1.ShapeDrawingMethod = tkShapeDrawingMethod.dmStandard;
                        switch (index_show)
                        {
                            case 1:
                                axMap1.set_ShapePointSize(PointLayer, i, 1);
                                axMap1.set_ShapePointType(PointLayer, i, MapWinGIS.tkPointType.ptImageList);
                                axMap1.set_ShapePointImageListID(PointLayer, i, indextype[0]);
                                axMap1.Redraw();                            
                                break;                               
                        }                   
                }

But it doesn't work, only drwaing small points with initial type. I want to use the  special picture to indicate the special point. 
Could anyone help me ?
Thanks a lot !!