The most basic function of a WebGIS platform is to query detailed attribute information of a map element. As a WebGIS platform, MapGuide is no exception. In the basic web page layout Ajax Viewer of MapGuide, click the map feature and the property information is displayed in the Properties window. The flexible web page layout also provides the property display Window Widget. Although it is not laborious, is there any more effort-saving solution? Actually, I do not want to point any mouse. If you just put the mouse there and stop it for a while, just pop up the information yourself ~~ Even if I'm lazy, there is more important. The attribute display function provided by MapGuide can only display the field information in the data source. Although the Join function of the data source can be used to connect to other background databases and other resources, but how nice it is to be able to control my own ID. What do I want to do with this ID ?! Can this be done in MapGuide?
The answer is, of course! I found that one of the major advantages of MapGuide is openness, which not only allows direct access to various data formats, but also provides open customization methods. We can solve the problem above with the ToolTip function. The following is a simple example to implement a common task, that is, when you point to a certain object, a floating window pops up to display the details of the object. These details can be obtained from the data source or from other external data sources, such as databases.
In MapGuide Studio, you can set the ToolTip of a layer, that is, when you hover your mouse over a feature, a bubble floating window pops up to display relevant information.
You can set ToolTip through Expression Builder. Expression Build can not only use many text processing functions and mathematical processing functions, but also Geomtric related functions, and easily obtain relevant information from the data source. Related fields are displayed in the data source. If you need to display the information of existing fields in the data source in ToolTip, you can easily complete it by using Expression Build.
Generally, fields such as FeatureID exist in the data source. When the data source can contain other information, more detailed information can be stored in the external database, it even needs to be obtained by connecting FeatureID to other external systems such as ERP and CRM. In this case, you only need to get the featureID and connect it to the custom page to complete the dataset processing.
The ToolTip content can contain any HTML Tag. We can embed an IFranme into the ToolTip to integrate the information page.
concat('Parcel\nName: ', RNAME, '\nAddress: ', RBILAD,'\nfeatid:', Autogenerated_SDF_ID ,'\n<iframe width=500 height=500 src= http://localhost/WebcastDemo/MapInforrmation.aspx?MyFeatID=', Autogenerated_SDF_ID ,'></iframe>')
In this example, the ID information is transmitted to MapInforrmation. aspx, and relevant processing is performed on this page. On this page, you can use ADO. NET and other general database technologies to access the database, or access other external data such as CRM and ERP.
Applicable in Flexible WebLayout.
As long as you have new ideas, MapGuide can be integrated with your existing system to add more vivid expressions and functions. Well, is there a sense that the world is at your fingertips? :)
Additional reading:
Concat improvement in Expression Builder in MapGuide/Map 3D 2011
Expression Builder in MapGuide/Map 3D 2011 is a very useful tool. For example, we often need to set ToolTip, URL Connection for layers, or construct filter strings, in this case, you can use the Visualized Expression Builder to generate an Expression. Click the button on the Right To activate Expression...
Add materials to the ToolTip of MapGuide Open Source
In the layer editor of Studio, click the button after "Tooltip displayed for Feature" to bring up the... link. You can add any html tag you need To The tooltip. Isn't it cool? J...
Use the ToolTip of MapGuide Open Source to create a Topic Map
ToolTip. This article describes how to add images to the MapGuide ToolTip And then accidentally see the images... tooltip expression for the Parcels layer wocould be... but it is always better than nothing. This is just an introduction. I noticed that ToolTip is only HTML. In fact, if you have the imagination, you can let it go...