Le lundi 12 juin 2006 à 15:44 +0300, Volkan Ulukut a écrit : > Hey list; > > I’m having trouble zooming to the exact location of the shape after > doing a search with queryByAttributes. I’m trying to use zoomrectangle > and zoomscale but they both need pixel position. So i try to convert > my georef coordinates to pixel coordinates. I believe that was > successful too, but the problem is that the shape is too small (a > street in the worldmap) and the pixel i calculate is not an integer > value. The zoom actually happens but not exactly on the shape just a > bit miles west and north. I tried to workaround this by zooming step > by step. By that i mean zooming to that location a little then zooming > to the centre till i get to the shape. But that won’t give the same > result on every search as you may guess. I’m stuck now cause i can’t > zoom to the right place with pixel coordinates. Is there any way that > i can zoom with georef coordinates(lat/long)?
Using the resultset.bounds, you get an extent of the resultset. With the setExtent method, you can apply it to the map. Didrik PS : if you're querying points, don't forget to manage the case of only one point in the resultset.
signature.asc
Description: Ceci est une partie de message numériquement signée
