Display map with specified point in center

Miroslav Šulc miroslav.sulc at STARTNET.CZ
Thu Dec 16 08:54:55 EST 2004


I have made some tests and it seems to me that if I count the extent of
the map with my point in the center of map then the extent is adjusted
according to the size of map when drawing the map but the center remains
still the same.

For example:
point: 400 600
my counted extent: 350 550 450 650 (counted by me, <point_x> - 50,
<point_y> - 50, <point_x> + 50, <point_y> + 50)
adjusted extent: 350 570 450 620 (adjusted by php myscript when drawing
the map)

Can somebody confirm it? Maybe I am wrong so I just want to be sure.

Miroslav Šulc


Miroslav Šulc wrote:

> Hi,
>
> I am still newbie so maybe I ask a stupid question but I cannot solve
> this one.
>
> I have a set (about 5000) points with coordinates in MySQL database and
> map that covers the region of the points. When user says "display THIS
> point on map", I would like to display map with this point in the center.
>
> I suppose I should
> 1) estimate the extent of the map that I want to display
> 2) insert the point into a layer (the point has coordinates) and draw
> the point
>
> I can somehow estimate the extent but I don't know how I can insert the
> point specified by coordinates into the map. I use PHP Mapscript. I
> would appreciate any suggestion.
>
> --
> Miroslav Šulc, CEO
> StartNet s.r.o.
> ----------------------------------------------------
> Vrchlického 161/5, Praha 5, 150 00, Česká republika
> ----------------------------------------------------
> ICQ: 60144073
> web: www.startnet.cz, www.novavystavba.cz
> ----------------------------------------------------
> mobil: +420 603 711 413
> telefon: +420 257 225 602
> ----------------------------------------------------
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: miroslav.sulc.vcf
Type: text/x-vcard
Size: 387 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20041216/b008429b/miroslav.sulc.vcf


More information about the mapserver-users mailing list