Mapguide Maestro Download

0 views
Skip to first unread message

Sherley

unread,
Aug 5, 2024, 4:57:07 AM8/5/24
to caheadpore
GordonLuckett of ArrowGeomatics has done multiple projects integrating databases with Cesium using MapGuide Open Source. With Cesium, one is able to stream any datasource, including SHP, SHF, SQLite, Oracle Spatial, SQL Server Spatial, and PostGIS data. The data is streamed from the MapGuide web server. This server, using a client called MapGuide Maestro, enables developers to connect to the data of their choice and create a styled layer to add to Cesium.

For example, using MapGuide and mapguide-rest, ArrowGeomatics added a layer of buildings in Nanaimo, Canada, to Cesium. The CZML was directly streamed from a 2D + height shapefile. Check out the demo at Arrow Geomatics Inc., Nanaimo Cesium Demo.


It assumes you have read the MapGuide Getting Started guide and are familiarwith using Autodesk MapGuide or MapGuide Maestro. Most examples also assume that you have installed thesample data and sample applications supplied with MapGuide.


Refer to the MapGuide Getting Started guide for details about the MapGuidearchitecture and components. It is important to understand the relationshipbetween a MapGuide Viewer, a MapGuide Web application, and the MapGuidesite. It is also important to understand resources and repositories.


When you define a web layout, using Autodesk MapGuide or some othermethod, you also define toolbar and menu commands. These can be standardpre-defined Viewer commands like pan, zoom, and refresh, or they can becustom commands. Custom commands are a way of extending MapGuide to interact with your mapping data.


Many custom commands run in the task area, a section of the Viewer that isdesigned for user input/output. For more details about the task area and howit integrates with the rest of the Viewer, see The MapGuide Viewer on page15.


Other sample applications are more full-featured. These are designed to showsome of the capabilities of MapGuide. They are not discussed in detail in thisguide, but they do build upon the basic concepts.


Complete examples are available from MapGuide Open Source Download Page.There are two required components: the source code and a package file forcreating the web layouts. The Sheboygan sample data must also be installed.


A MapGuide repository is a database that stores and manages the data for thesite. The repository stores all data except data that is stored in externaldatabases. Data stored in a repository is a resource.


In addition, each session has its own repository, which stores the run-timemap state. It can also be used to store other data, like temporary layers thatapply only to an individual session. For example, a temporary layer might beused to overlay map symbols indicating places of interest.Data in a session repository is destroyed when the session ends.


The map is saved in the session repository so it is available to all pages in thesame session. You cannot save a map in the library repository.Map creation is handled by the Viewers. When a Viewer first loads, it createsa map in the session repository.


A web layout describes how the map looks when it is displayed in a webbrowser. Using Studio, Maestro or some other method to edit the web layout resource,you can create and customize the layout, changing how it looks in a browserand what features are enabled.


The simplest way to display a web layout is to pass its resource identifier as aGET parameter to the Viewer URL. For example, the following will display aweb layout using the AJAX Viewer running on localhost:


All MapGuide sites require authentication with user id and password. Ifauthentication succeeds, MapGuide creates a session, identified by a uniquesession id. This keeps the state consistent between the viewer and the serveracross multiple HTTP requests. Subsequent access to the site requires thesession id instead of the user id. By default, the Viewer handles authenticationitself, and it prompts for user id and password when it first loads. There aresituations, though, where it is better to authenticate before loading the Viewerpage.


To perform authentication before the Viewer loads, embed the Viewer inanother page using a or element. The outer page can doany necessary authentication, create a session, then pass the web layout andsession id to the Viewer frame.


The following example displays a web layout using the AJAX Viewer. Itperforms some basic initialization and creates a session, then displays a Viewerpage using the session identifier and the web layout.


This next sample MapGuide page displays some basic information about amap. It does not do any complicated processing. Its purpose is to illustratethe steps required to create a MapGuide page and have it connect to a Vieweron one side and the MapGuide site on the other.


A MapGuide Server Page is any PHP, ASP.NET, or JSP page that makes use of theMapGuide Web API. These pages are typically invoked by the MapGuideViewer or browser and when processed result in HTML pages that are loadedinto a MapGuide Viewer or browser frame. This is the form that will be usedfor most examples in this guide. It is possible, however, to create pages thatdo not return HTML or interact with the Viewer at all. These can be used forcreating web services as a back-end to another mapping client or for batchprocessing of your data.


One part of the initial setup is creating a web layout, which defines theappearance and available functions for the Viewer. When you define a weblayout, you assign it a resource name that describes its location in therepository. The full resource name looks something like this:


When you open the web layout using a browser with the AJAX Viewer the resource nameis passed as part of the Viewer URL. Special characters in the resource name are URL-encoded,so the full URL would look something like this, (with line breaks removed):


Part of the web layout defines commands and the toolbars and menus thatcontain the commands. These commands can be built-in commands, or theycan be URLs to custom pages. The web layout also includes a URL to a hometask that displays in the task pane. The home task can open other pages.


Custom pages are loaded by the Viewer page, so a relative URL for a custompage must start at the Viewer directory, then go up one level to reach the mapguidedirectory. For example, a custom page located at www/mapguide/samplesphp/index.phpwould use the following relative URL in the web layout


Most MapGuide pages follow a similar processing flow. First, they create aconnection with the site server using an existing session id. Then they openconnections to any needed site services. The exact services required dependon the page function. For example, a page that deals with map feature datarequires a feature service connection.


Once the site connection and any other service connections are open, thepage can use MapGuide Web API calls to retrieve and process data. Outputgoes to the task pane or back to the Viewer. See The MapGuide AJAX Viewer for details about sending data to the Viewer.


The following sample illustrates basic page structure. It is designed to be calledas a task from a Viewer. It connects to a MapGuide server and displays themap name and spatial reference system for the map currently being displayedin the Viewer.


When you first go to the URL containing the web layout, the Viewerinitiates a new session. It prompts for a user id and password, and usesthese to validate with the site server. If the user id and password are valid,the site server creates a session and sends the session id back to the viewer.The Viewer passes the session information every time it sends a requestto a MapGuide page. The pages use this information to re-establish asession.


The webconfig.ini file contains parameters required to connect to the siteserver, including the IP address and port numbers to use forcommunication. MgInitializeWebTier() reads the file and gets thenecessary values to find the site server and create a connection.


The site server saves the user credentials along with other sessioninformation. These credentials must be supplied when the user firstconnects to the site. At that time, the Viewer authenticates the user andcreates a new session using the credentials. Using the session ID, otherpages can get an encrypted copy of the user credentials that can be usedfor authentication.


Access to resources is handled by a resource service. In this case, the pageneeds a resource service in order to retrieve information about the mapresource. You may need to create connections to other services, depending on theneeds of your application.


The map name is also passed by the viewer to the MapGuide page. Usethis name to open a particular map resource with the resource service.Once the map is open you can get other information. This exampledisplays the spatial reference system used by the map, but you can alsoget more complex information about the layers that make up the map.


The MapGuide site performs many different functions. These can be all doneby a single server, or you may balance the load across multiple servers. Someessential functions must execute on the site server, while other functions mayexecute on support servers.


A service performs a particular set of related functions. For example, a resourceservice manages data in the repository, a feature service provides access tofeature data sources, and a mapping service provides visualization and plottingfunctions.


These two foals, which appear similar at a first glance, are made from completely different materials. One is made from carefully chosen pieces of driftwood found on the beach, the other is a bronze cast.


This still, silent and meditative space is made within, and from, the surrounding landscape in the tradition of the land and environmental art movements originating in 1960s America. The beehive chamber, built by local dry-stone hedgers, was constructed from nearly 120 tonnes of Cornish granite and slate.


These murals were painted in-situ by the Peruvian maestro vegetalista (shamanic herbalist) Don Francisco Montes Shuna and artist Yolanda Panduro Baneo. To the Capanahua, indigenous people of the Peruvian rainforest, vegetalista are said to gain their knowledge and power to heal from the plants of the region. The murals portray different narratives and depictions of the plants that the artists' use, while also exploring the spiritual connection between plants and humanity.

3a8082e126
Reply all
Reply to author
Forward
0 new messages