MapGuide Tips -- how to limit the scaling range of MapGuide Ajax Viewer

Source: Internet
Author: User

 

During MapGuide-based development, have you ever encountered such a requirement? My map only needs to be enlarged to a certain extent, so it cannot be enlarged without limit. It cannot be scaled out without limit, because I care about it, it doesn't make any sense to narrow down without limit. Well, since the customer said so, how should we implement it?

MapGuide does not provide corresponding APIs, but fortunately, MapGuide is open-source. We can change the source code. Open C: \ Program Files \ Autodesk \ MapGuideEnterprise2010 \ WebServerExtensions \ www \ viewerfiles \ ajaxmappane. templ in notepad or your favorite text editor. The code is roughly in line 328 and is as follows:

Var minScale = 0.001, maxScale = 1000000000000;

Modify the corresponding minScale and maxScale to your appropriate value. Try it! J

 

However, you need to be aware that this is a change to the MapGuide source file, so it will be applied to all MapGuide applications on this site.

To reprint or those content automatically capture the site, please indicate the original source of this article http://www.cnblogs.com/junqilian/archive/2009/10/29/1592145.html

OK, Stay Tuned!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.