[mapguide-users] Search Function

James Card James.Card at calcad.com
Wed Nov 5 12:00:59 EST 2008


On Wed, 05 Nov 2008 05:43:35 -0800, James - MapGuide n00b  
<Jamie.Loy at us.army.mil> wrote:

> To add to this question….How can you control the level of zoom that  
> clicking the result of the search will display?  I have a building  
> layer, when I search and click the result I am zoomed into about 100’.   
> When I search for Man Holes and click the result I am zoomed into like 2  
> inches!

I'm guessing that your buildings layer is polygons and the manholes layer  
is points. The zoom function looks at the size of the polygon and sets the  
zoom scale accordingly, but points have no size so there is a minimum zoom  
scale specified in the AJAX viewer code. This definition "var minScale =  
0.001, maxScale = 1000000000000;" is in the  
WebServerExtensions/www/viewerfiles/ajaxmappane.templ file. You can  
override that value in your own JavaScript code, or just modify it in the  
template file (but remember that it will affect all layers in all maps,  
and that file will be overwritten when you upgrade MapGuide to the next  
release).

-- 
James Card
California CAD Solutions, Inc.
209-578-5580 - Voice
209-521-6493 - FAX


More information about the mapguide-users mailing list