[Mapserver-users] center map on x,y coordinates

Elisabeth Nolz e9625730 at student.tuwien.ac.at
Wed May 5 06:25:04 EDT 2004


hi alexandro.
the problem were not the double quotes but the comma in my coordinates, so i
tried points instead of commas:
http://localhost/cgi-bin/mapserv?map=map.map&mapxy=339989.20%201646.20&scale=5000

now i get this new error (???):
mapserv(): Web application error. No template provided. 


On Wednesday 05 May 2004 12:53, Alexandros Chimarios wrote:
Hi Elisabeth, 

    maybe it's because of the URL( which I told you to try yesterday ;-)) ),
try this mapxy param without the double quotes "", like that :

http://myserver.com/cgi-bin/mapserver?map=parcel.map&mapxy=x_from_mysql
y_from_mysql&scale=150000


On Wednesday 05 May 2004 12:13, Elisabeth Nolz wrote:
hi paco.
i've tried scale=15000000 or scale=5000, but there's still this error: "
getNumeric(): Incorrect data type. "
perhaps you have an idea what's causing this problem.


On Tuesday 04 May 2004 16:04, Paco Regodon wrote:
The scale parameter is not clear, as it is related with RESOLUTION.

If your units are meters, you can calculate your escale using this formula:

scale = ((EXTENT * 100) * RESOLUTION / 2.54 ) / image_width_in_pixels.

RESOLUTION defaults to 72 dpi (dots per inch) but you can change it in the
mapfile if you need to.
Just try a big scale (scale=15000000).

Have you tried using MAPXY/BUFFER instead of MAPXY/SCALE?

Paco


On Tuesday 04 May 2004 11:24, Elisabeth Nolz wrote:
hi list.
in my application i have a drop-down menu with lots of addresses (addresses
and appropriate x,y coordinates stored in a mysql-database). the user can
choose one address and then click on the submit-button to show the map
centered on the chosen address.
the problem is, that i don't know how i could center my map on x,y
coordinates.

i found the following entry in the mapserver-user-history:
"If you have x,y coordinates for the centers of your parcels in your mysql
database, you can just run your search, grab the results, and redirect to a
url like:
http://myserver.com/cgi-bin/mapserver?map=parcel.map&mapxy=x_from_mysql+y_from_mysql&scale=150000"

i tried this link with my coordinates but it doesn't work this way. could
someone help me please?

thx,
elisabeth.






More information about the mapserver-users mailing list