After we have installed the MapGuide server and Maestro or MapGuide Studio, can you try it out? Since MapGuide is a fast GIS data publishing platform, if you want to see the effect, you must first have some data. I think everyone can download the Sheboygon test data from the OSGEO website. If you haven't downloaded it, you can download it from the address below: http://download.osgeo.org/mapguide/releases/2.0.2/samples/
Samples-Symbolization.mgp 22-Sep-2008 01:21 114K Sheboygan.mgp 22-Sep-2008 01:21 13M dotnetviewersample.zip 22-Sep-2008 01:21 117K javaviewersample.zip 22-Sep-2008 01:21 91K phpviewersample.zip 22-Sep-2008 01:21 64K
*. Mgp is our test data packet about Sheboygan, an American town. This test data package contains Sheboygon basic terrain, transportation, greening, land use map, community and other maps, and follows the map utilization requirements in MapGuide, set up FeatureSource, layer, Map, and WebLayout.
When we see this, it is estimated that some people will often misunderstand that the previously used map format in MapGuide is *. mgp is no doubt, so I have some shp and so on here. How can I convert it to mgp? In fact, this is a misunderstanding. MapGuide does not have its own proprietary data format like other GIS platforms. It can directly read our most common GIS format, for example, in SHP, SDF, and Oracle Spatial, this is due to the FDO technology. In layman's terms, we can regard FDO as something like ODBC. Using FDO doesn't care what the underlying data format is, you only need to use FDO to publish data to the MapGuide platform without conversion and loss. We will introduce FDO in detail in subsequent articles.
In this case, we can use FDO to connect to my existing data format. What does mgp do? Before proceeding, let's take an anatomy of this mgp file.
First, we will download the downloaded Sheboygan. change the mgp extension to zip, and decompress it using tools such as 7-zip or winrar. Then, you will find that there are actually a lot of xml files, there are also some data files such as SDF. So in the end, there is nothing mysterious about this mgp, that is, a compressed package.
Since it is a compressed package, its usefulness is self-evident. We often compress it just to transfer multiple files. The same is true for the mgp files in MapGuide, which are used only when map resource files are exchanged on different MapGuide servers. This is only a compressed version of the resource database in our MapGuide server.
Now, I want to import the Sheboygan. mgp downloaded from the OSGEO website to my own MapGuide server. We have two methods:
1. Use Maestro. First, we need to open Maestro and connect to MapGuide Server.
The Server here is the address of the MapGuide Server, http: // localhost/mapguide/mapagent. fcgi. For MapGuide Enterprise, the address is http: // localhost/mapguide <xxxx>/mapagent. fcgi, where xxxx is the version number, such as 2009,201 or 0.
The default user name is Administrator. Note that A is in upper case, the password is admin, and all are in lower case.
After connecting to the MapGuide Server, select the Restore Package in the Package menu and open the mgp file to be restored. Then, Restore the mgp file to the MapGuide Server. After the shybogan file is restored, it restores the contained resources.
On the contrary, what should we do if we want to package resources on our servers and pass them to others? For example, to Package all the resources in the preceding Layout directory, select the Layouts directory, select Create Package from the Package menu, fill in the file path, and click OK to generate the Package.
2. If you do not follow Maestro, you can use the package management tool in Site Administrator of MapGuide to load or generate data packets.
First, we need to copy the mgp file to the Package directory of the MapGuide Server. The corresponding MapGuide Open Source is C: \ Program Files \ OSGeo \ MapGuide \ Server \ Packages.
Open Site Administrator. You can use the shortcut button in the Start Menu or directly enter http: // localhost/mapguide/mapadmin/login in the browser. php, you need to enter the user name and password, and the default user name is Administrator. Note that A is in upper case, the password is admin, and all are in lower case.
Go to Manager Packages, select the Package to be loaded, and click Load Package.
To generate a package on the same page, fill in the resource ID to be packaged on it, and click Make. The resource ID is like Library: // Samples/Sheboygan/Layouts /. The data packet is automatically placed in the Package directory of the MapGuide Server.
Here we will introduce the very convenient and small features of Maestro, because the resource ID we will often use in subsequent development, Maestro provides us with a very considerate method, copy the resource ID to the clipboard and right-click the resource.
Now, we will introduce the usage of Autodesk MapGuide Studio.
For more information about MapGuide development, visit the MGDN forum of MapGuide Developer Network.