Donatas, You'll have to convert the longitude/latitude to pixels. I'm not very familiar with those conversions since I don't play with that often. However, I think the following example can help you to figure out how to do it: http://lists.osgeo.org/pipermail/mapserver-users/2005-June/008214.html
Perhaps, someone else on the list could give you a better/smaller example. regards, Alan On January 25, 2010 02:51:41 am Donatas Malinauskas wrote: > Hi Alan, > > Thanks for yours reply! Yes now it's clear pixels are integers... It is > too bad that this simply function mismatches to me. Is there other > recenter function which works with x,y in lonlat? I didn't see something > like that in mapserver/mapscript documentation... > > Good day, > Donatas. > > Alan Boudreault wrote: > > Donatas, > > > > The x,y given to the zoomPoint function are in PIXEL, not lonlat. You > > cannot specify a half pixel. That said, pixel are integers, not double. > > > > Alan > > > > On January 22, 2010 03:22:30 am Donatas Malinauskas wrote: > >> HGood day, > >> > >> I have some problem. I want to recenter my map exactly to users given > >> georeferenced coordinates. For that purpose I use php mapscript function > >> - zoompoint(ZOOMFACTOR,$myXY, WIDTH, HEIGHT, EXTENT) with ZOOMFACTOR=1. > >> But this function doesn't work correctly. ZoomPoint function centers map > >> to rounded x,y position (then I have myX 235.5px and myY 330.42 it > >> rounds to 235px, 330px) and moves map to incorect center coordinates. > >> What should I do in this situation, please give me some advice, how > >> recenter map with best precision. > >> > >> Thanks, > >> Donatas. > >> _______________________________________________ > >> mapserver-users mailing list > >> mapserver-users@lists.osgeo.org > >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- Alan Boudreault Mapgears http://www.mapgears.com _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users