Intelligent landing page for AIMS/MapGuide Ajax viewer

Source: Internet
Author: User

By Daniel Du

You may come into ss the InitialMapView sample page in php, It expects the values to be passed to the script as query string parameters, and zoom to specified view port when loading the map. here is an intelligent landing page MapGuide Viewer in. NET, and with more extended functionalities.

 

1. Zoom to specified view port by initial x, y and scale, the URL is expected as below: http: // serverName/MgViewerExtention/Default. aspx? X =-87.723233 & Y = 43.754561 & scale = 5000
It works by taking a copy ofWebLayoutStored inLibrary repositoryAnd changing the <CenterX/>, <CenterY/> and <Scale/> elements. The updated XML is written intoSessionAnd is used as the target when the page is ultimately loaded.

 

2. query, zoom to and highlight by filter string. it accepts layer name, keyFieldID and id value, for following URL, map viewer zooms to the objects corresponding to "Autogenerated_SDF_ID in (1812,1813)" in the layer Parcels, highlighted if "highlight = 1 ".

Http: // localhost/MgViewerExtention/Default. aspx? Layer = Parcels & KeyField = Autogenerated_SDF_ID & ListId = 1812,1813 & highlight = 1

 

3. filter features shown on map. you may have thousands even millions of features in a data source, but sometime you do not need to show all of them on map. with a filter string in URL, you can filter the features in MapGuide viewer when the viewer shows up. with following URL, I only show the parcels which Autogenerated_SDF_ID great than 1000:

Http: // localhost/MgViewerExtention/Default. aspx? Layer = Parcels & layerfilter = Autogenerated_SDF_ID & gt; 10000

 

The sample project can be downloaded here, it is based on AIMS 2013, but it cocould be easy to apply it to other version of AIMS/MapGuide. if you are interested in how it is implemented in detail, please download and read the code. hope it helps.

Download MgViewerExtention

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.