shape movement on map

Dec 16, 2010 at 10:36 AM

hi everybody!

i need, in my own application, to move shapes by drag&drop.

i've used the SelectShapes() method to verify if there is a shape in a certain rectangle...but it always return true!

so, what is the problem?

this is a piece of code that i've written:

if(this->platformShpFile->SelectShapes(ext, 0.0/*buffer*/, MapWinGIS::SelectMode::INTERSECTION, result))

where this->platformShpFile is the shapefile that includes all shapes...

please help me soon!


thanks a lot!

Dec 17, 2010 at 9:57 AM

It depends on your ext variable.

How big is it. You should create one use the mouse location and pixelToProjection().

Your variable result is an array on integers containing the shapeIDs of the selected shapes.


Dec 20, 2010 at 8:41 AM

hi Paul,

the ext variable is defined as follows:

ext->SetBounds(x-15, y-15, 0, x+15, y+15, 0);

the Shape that i want to select is a Point shape...

any other suggestion?



Dec 20, 2010 at 8:44 AM

i've forgot to write the following:

this->axMap1->PixelToProj(e->x, e->y, x, y);

in which i set the x&y variables with the values taken by mouse position...