In the previous section, we introduced MapGuide's data packet management and Maestro. This time we wanted to continue to introduce Autodesk's map editing tool MapGuide Studio, however, if you have installed MapGuide, you must first run a small example to check the effect. Today we will introduce how to correctly configure and run the first one. net sample code.
If you have not downloaded our map data package and sample code, you can download it from the following link.
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
I believe that you tried to browse Shebogan in IE after loading Sheboygan's map and exploring Maestro or MapGuide Studio. webLayout. although the map can be displayed, the failure of the http404 error may disappoint you. This is because we have not installed and configured our dotnetviewersample, let's take a closer look at the error information to understand:
The resource cannot be found.Requested URL:/Mapguide/dotnetviewersample/overview/overviewmain. aspx
So since dotnetviewersample/overview/overviewmain. aspx cannot be found, can we set the specified file to the specified position as required? Therefore, we extract the downloaded dotnetviewersample.zip file to C: \ Program Files \ OSGeo \ MapGuide \ Web \ www. The corresponding virtual directory is/mapguide/dotnetviewersample /...
So where does one specify the dotnetviewersample/overview/overviewmain. aspx? In fact, this is specified in our WebLayout. See the Initial Task in Taskpane in the figure below:
Of course, we can change the initialization address to point to your own page in future development.
There are several steps below:
1. Copy all the dll Files in C: \ Program Files \ OSGeo \ MapGuide \ Web \ www \ mapviewernet \ bin to C: \ Program Files \ OSGeo \ MapGuide \ Web \ www \ dotnetviewersample \ bin
2. You need to set the application for the virtual directory. This is a very important step. Start -- run the program, enter inetmgr to open the IIS manager, right-click dotnetviewersample to open the Properties dialog box, and click "CREATE"
If you do not create an application, it may appear in the running example.Compiler Error Message:CS0246: The type or namespace name 'jayrock 'cocould not be found (are you missing a using direve ve or an assembly reference ?) .
Generally, the following items must be set as applications:
MapGuide;
MapViewerAjax;
MapAgent;
DotNetViewerSample;
Mapviewernet;
Now you can click Show In Broswer In Maestro to browse the instance application.
The example contains the element query, including querying the element list, space query, and searching the location on the element map based on the element attributes.
In addition, you can create a topic diagram.
These codes are all written by. NET. After studying these codes carefully, we believe that MapGuide can be used to build your own WebGIS application.
Happy MapGuidding ~