ImageMap

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi to all,

I have a Spain Map as webcontrol. This webcontrol its a ImageButton.

How could i identify in wich region (area) the user clicks?

I only know how obtain the x and y coordinates where the user click. But i
dont know how identify the area.

Any help would be appreciated.
Thx.
 
Hi

The simpliest way is:
- Identify these regions by their centroids (center of region),
and find the neares one.

Other ways:
- Define a rectangle (rectangles) for each region, this rect
will represent range of x,y for a region.
- Raster region recognition - keep each region as its binary
raster map (e.g. region-white, black-else), scan those maps
to find the choosen one.
- 2D vector region recognition - keep each region as polygon,
and use (advanced) search to find the choosen one.

Look for GIS or 2D (3D) algorithms on web for more info.

Regards

Marcin
 
Back
Top